A user can force a function to be inlined by specifying the always_inline attribute. Currently, thinlto implementation is not aware of always_inline functions and does not guarantee import of such functions, which in turn can prevent inlining of such functions.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
I just started to look at this (added a minor comment below) - but could you please re-upload this with full context so that it is easier to review?
| llvm/include/llvm/IR/ModuleSummaryIndex.h | ||
|---|---|---|
| 550 | document | |
| llvm/test/ThinLTO/X86/Inputs/funcimport_alwaysinline.ll | ||
|---|---|---|
| 11 | the definition of \#1 and \#0 seems to be missing? | |
| llvm/test/ThinLTO/X86/Inputs/funcimport_alwaysinline.ll | ||
|---|---|---|
| 11 | Probably can just remove the attribute numbers here since they aren't needed. | |
Thanks for working on this! One suggestion for test cleanup below.
| llvm/test/ThinLTO/X86/funcimport_alwaysinline.ll | ||
|---|---|---|
| 30 | I don't think you need all these calls to @bar (or any, or the def of @bar). I believe this was from another test that was testing the import-instr-limit. Since you have 0 you don't need anything here. | |
document