[PATCH] D17212: [ThinLTO] Support for call graph in per-module and combined summary.

Easwaran Raman via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 24 14:32:42 PST 2016


eraman added inline comments.

================
Comment at: include/llvm/ProfileData/ProfileCommon.h:98
@@ +97,3 @@
+  auto ScaledCount = BlockFrequency(EntryCount);
+  if (EntryFreq > UINT32_MAX || BlockFreq > UINT32_MAX)
+    // Can't use BranchProbability in general, since it takes 32-bit numbers.
----------------
Why not just do
ScaledCount = EntryCount * BlockFreq / EntryFreq using APInt<128>, take the lower 64 bits if the result fitx within uint64_t and use UINT64_MAX otheerwise?



http://reviews.llvm.org/D17212





More information about the llvm-commits mailing list