Load sample profile in LTO link step.
ThinLTO calls populateModulePassManager to load the profile
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Looks like the same issue exists in the new pass manager. The sample loader is added via buildModuleSimplificationPipeline, which is not called either directly or indirectly from buildLTODefaultPipeline. Can you add and test the fix there too? Thanks!
lib/Passes/PassBuilder.cpp | ||
---|---|---|
1006 ↗ | (On Diff #174221) | I thought sample profile is already loaded twice -- one in FE and one in backend compilation. Is it not the case? |
lib/Passes/PassBuilder.cpp | ||
---|---|---|
1006 ↗ | (On Diff #174221) | I see thats the case for ThinLTO. but not for LTO. |
lib/Passes/PassBuilder.cpp | ||
---|---|---|
1008 ↗ | (On Diff #174221) | Nit: I think the typical format is to put the parameter name comment before the constant. |
test/LTO/Resolution/X86/load-sample-prof-lto.ll | ||
19 ↗ | (On Diff #174221) | No need to use different check prefixes for the two pass managers since they are checking the same thing. |
lib/Passes/PassBuilder.cpp | ||
---|---|---|
1008 ↗ | (On Diff #174221) | A few lines up, line 976 in this file says different -:). |
lib/Passes/PassBuilder.cpp | ||
---|---|---|
1008 ↗ | (On Diff #174221) | Ok nevermind then, better to be consistent within this file. |