[PATCH] D15003: Interface to attach maximum function count from PGO to module as module flags.
David Li via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 25 20:29:10 PST 2015
davidxl added a comment.
I think the inliner/indirect call promoter also needs another meta data at the module level -- that is the max internal BB count (of the program) .
In the longer term, we also need to design better program summary information such as bb counter histogram with respect to exec freq -- but for now, max BB count would be sufficient.
================
Comment at: lib/IR/Module.cpp:502
@@ +501,3 @@
+ cast_or_null<ConstantAsMetadata>(getModuleFlag("MaxFunctionCount"));
+ if (!Val) return None;
+ return cast<ConstantInt>(Val->getValue())->getZExtValue();
----------------
Format -- put return in a new line.
Repository:
rL LLVM
http://reviews.llvm.org/D15003
More information about the llvm-commits
mailing list