nickdesaulniers added inline comments.

================
Comment at: llvm/lib/Transforms/Utils/MisExpect.cpp:108
+      // extract values from misexpect metadata
+      const ConstantInt *IndexCint =
+          mdconst::dyn_extract<ConstantInt>(MisExpectData->getOperand(1));
----------------
`const auto *IndexCInt`

`auto` should be used when the type is used in the rhs of an assignment such as 
in a template specifier IMO.  Ditto for below.


================
Comment at: llvm/lib/Transforms/Utils/MisExpect.cpp:123
+      const uint64_t CaseTotal = std::accumulate(
+          Weights.begin(), Weights.end(), (uint64_t)0, std::plus<uint64_t>());
+      const int NumUnlikelyTargets = Weights.size() - 1;
----------------
s/(uint64_t)0/0ULL/ might be simpler, but I don't know if `long long == 
uint64_t` on every host Clang can be built for...


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D66324/new/

https://reviews.llvm.org/D66324



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to