This patch boosts the inlining threshold for a particular type of functions that are using an incoming argument only as a memcpy source.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/test/CodeGen/SystemZ/inline-thresh-adjust.ll | ||
---|---|---|
2 | This doesn't check that a particular function is actually inlined, but it can at least make sure that this type of function gets a boosted threshold, so maybe it could still be used, or? |
llvm/test/CodeGen/SystemZ/inline-thresh-adjust.ll | ||
---|---|---|
2 | How stable are these particular numbers (1012, 1687)? I don't think it would be a good idea to hard-code those in a test case if they change randomly with any codegen change? If we want to test whether the function is inlined, can't we simply verify whether the function name symbol does not exist in the output (because the function was completely eliminated)? |
llvm/test/CodeGen/SystemZ/inline-thresh-adjust.ll | ||
---|---|---|
2 | They may change I guess, but the test case is only running the inliner pass and nothing else, so it would not be sensitive to any codegen change. I think those numbers may change if the inliner heuristics are modified but I was hoping that then it would be trivial to update the test. I could also try to use the original function and check that it gets inlined, but that may be a little tricky as the cost is adjusted per the context of the call-site. I guess I could just reduce the original imagick file. |
See inline comment. Otherwise LGTM. Thanks!
llvm/test/CodeGen/SystemZ/inline-thresh-adjust.ll | ||
---|---|---|
12 | Maybe also allow wildcards for the cost. |
This doesn't check that a particular function is actually inlined, but it can at least make sure that this type of function gets a boosted threshold, so maybe it could still be used, or?