In the attached test case attempt to import function foo causes promotion of function bar, which prevents inlining it on codegen phase.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Thanks! Couple suggestions.
lib/Analysis/ModuleSummaryAnalysis.cpp | ||
---|---|---|
309 ↗ | (On Diff #127870) | Move it up here and just OR into this bool. |
test/ThinLTO/X86/noinline.ll | ||
11 ↗ | (On Diff #127870) | It would be better to check for the non-import of foo directly. E.g. pass -save-temps to llvm-lto2, then ensure a define of foo does not exist in the llvm-dis of the resulting %t1.bc.imports file. This would enable you to simplify the test - no need to have bar at all. Also the test will still work as expected in a possible future where we might decide to import bar as a local copy to avoid the promotion. |
Comment Actions
LGTM with one minor comment nit.
Thanks!
lib/Analysis/ModuleSummaryAnalysis.cpp | ||
---|---|---|
310 ↗ | (On Diff #127990) | s/inline functions/import functions/ |