[PATCH] D31154: Use ProfileSummary:getProfileCount to get ScaledCount for ModuleSummary

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 20 16:57:23 PDT 2017

tejohnson added inline comments.

Comment at: lib/Analysis/ModuleSummaryAnalysis.cpp:235
+        auto ScaledCount =
+            ProfileSummaryInfo::getProfileCount(CS.getInstruction(), BFI);
         auto Hotness = ScaledCount ? getHotness(ScaledCount.getValue(), PSI)
We already have the instruction (&I), no need to consult the CS.

Comment at: test/Bitcode/thinlto-function-summary-callgraph-profile-summary.ll:53
   call void @hot2()
+  call void @hot4(), !prof !15
   call void @none1()
Do we get a profile count on a call instruction that gives a different weight than the enclosing BB only for SamplePGO I guess?


More information about the llvm-commits mailing list