This provides interface to get and set maximum function counts to Module. This would allow things like determination of function hotness. The actual setting of this max function count will have to be done in clang.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
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.
lib/IR/Module.cpp | ||
---|---|---|
502 ↗ | (On Diff #41196) | Format -- put return in a new line. |
How is this going to interact with SamplePGO? Currently, I'm testing a change that adds the InlineHint attribute for functions that globally collected a fraction of samples greater than a given threshold. Likewise, for functions that fall below another threshold, they receive the Cold attribute.
The API talks in terms of function counts, how is this related to the entry count I added earlier? What would SamplePGO have to do here?
Thanks.
lib/IR/Module.cpp | ||
---|---|---|
502 ↗ | (On Diff #41196) | clang-format suggests I have the return on the same line. |