This patch adds initial support for using the new pass manager when
doing ThinLTO via libLTO.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
That is easier than I think. Is there still any missing function in terms of NewPM after this patch?
llvm/lib/LTO/ThinLTOCodeGenerator.cpp | ||
---|---|---|
529 | There is another instance of optimizeModule. Maybe update that as well? | |
llvm/test/ThinLTO/X86/diagnostic-handler-remarks.ll | ||
23 | Why this test case needs to be changed for switch PM? |
llvm/test/ThinLTO/X86/diagnostic-handler-remarks.ll | ||
---|---|---|
23 | Looks like we went from foo inlined into main to bar inlined into foo. Maybe we now have two remarks: bar inlined into foo + foo inlined into main? |
Updated to also add the -debug-pass-manager option, so it is easier to check that -use-new-pm works as expected. I also pinned the remarks tests to use the legacy PM and updated llvm/test/ThinLTO/X86/newpm-basic.ll to check that the new PM is run via the debug output.
It's still not unified with the new LTO API, so if anything in the pipeline setup changes in the new LTO API we have to also update the code here. But other than that, ThinLTO should use the NewPM same as with the new API.
llvm/test/ThinLTO/X86/diagnostic-handler-remarks.ll | ||
---|---|---|
23 | Yep, but I don't think this change is really relevant for the switch to the new PM, as different inlining decisions are just a side-effect of using the new PM. In the latest version I pinned the remarks tests to use the legacy PM and updated llvm/test/ThinLTO/X86/newpm-basic.ll to check that -use-new-pm works as expected. |
clang-tidy: warning: invalid case style for parameter 'count' [readability-identifier-naming]
not useful