[PATCH] D16381: Infrastructure to allow use of PGO in inliner

David Li via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 3 16:42:20 PST 2016

davidxl added inline comments.

Comment at: include/llvm/Analysis/InlineCost.h:152
@@ -132,1 +151,3 @@
+/// \brief Return estimated count of the block \p BB.
+Optional<uint64_t> getBlockCount(BasicBlock *BB, BlockFrequencyAnalysis *BFA);
ok -- ProfileCommon.h will be a better place in the future. For now let's keep it here -- but I think we should have a top level wrapper to get count for callsite here.

Comment at: test/Transforms/Inline/function-count-update.ll:5
@@ +4,3 @@
+; This tests that the function count of a callee gets correctly updated after it
+; has been inlined into two back-to-back callsites in a single callee. The callee
+; has an alwaysinline attribute and so gets inlined both with the regular inliner
in a single callee or in a single BB?

The test intends to verify that the profile update of the second inlined callsite is correct after block split -- so having the callee identical in the two sites are not essential to the test.

Comment at: test/Transforms/Inline/function-count-update.ll:21
@@ +20,3 @@
+  ret i32 %r2
The purpose is to verify that copyBlockFrequency after bb split works in general not just the entry block.


More information about the llvm-commits mailing list