[llvm] [PassBuilder] Add a pass to LTO postlink step (PR #124053)
Paul Kirth via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 24 14:34:28 PST 2025
================
@@ -1926,6 +1926,8 @@ PassBuilder::buildLTODefaultPipeline(OptimizationLevel Level,
// Remove unused arguments from functions.
MPM.addPass(DeadArgumentEliminationPass());
+ MPM.addPass(RelLookupTableConverterPass());
----------------
ilovepi wrote:
Shouldn't this be much later in the pipeline? I'd guess after MergeFunctions, but before CGProfile is probably a better spot(https://github.com/llvm/llvm-project/blob/77c23fd0aa1534abe904c2d5256a6d7879dc3cf7/llvm/lib/Passes/PassBuilderPipelines.cpp#L2123) for high opt levels. You'll probably want to add it before the returns for lower opt levels too.
I suppose it could arguably be added to Late EP callbacks, as that would also apply to other optimization levels, w/o needing to specifically add the pass everywhere.
CC: @aeubanks @nikic @efriedma-quic
https://github.com/llvm/llvm-project/pull/124053
More information about the llvm-commits
mailing list