[llvm] [SHT_LLVM_BB_ADDR_MAP] Add a new PGOAnalysisMap feature to emit dynamic instruction count (PR #119303)
Lei Wang via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 10 16:27:27 PST 2024
wlei-llvm wrote:
> Ah, that makes more sense. What's the practical limitation here though? Is there some build-system limitation on your side that you're running into with regard to object/executable sizes?
There isn't a strict limitation, but in one of my test, there is an 100MB+ size overhead, which is not negligible to user. Then people may come to argue that if it’s possible to keep only what’s necessary(we don't enable `SHT_LLVM_BB_ADDR_MAP ` by default), like here only emit the final instruction count number. That said, assuming the offline tool/the fancy cost mode can get more accurate number or be particularly convenient for use, I’m confident to convince service user to accept it(I need to study more :) ).
Relatedly, could you clarify the reasoning behind using an offline tool instead of the calculation directly in the compiler? Given that all the necessary info should be already available in the compiler. Is the calculation very time-consuming or just for development convenience(as I can see, it needs a lot of iterations for model training stuffs). I’m wondering if this eventually would be ported into the compilation pipeline(say once the model is pretty accurate).
https://github.com/llvm/llvm-project/pull/119303
More information about the llvm-commits
mailing list