[PATCH] D148010: [Pipelines] Don't run module optimization in full LTO pre-link
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 11 05:54:50 PDT 2023
nikic created this revision.
nikic added reviewers: aeubanks, fhahn, dmgreen.
Herald added subscribers: ormris, StephenFan, steven_wu, hiraditya, inglorion.
Herald added a project: All.
nikic requested review of this revision.
Herald added subscribers: llvm-commits, pcwang-thead.
Herald added a project: LLVM.
When LTO is used, the pre-link pipeline is supposed to only perform module simplification, but not optimization. The post-link pipeline is responsible for optimization. In particular, we should not perform size increasing optimizations like loop vectorization and runtime unrolling before the second inlining run in the post-link pipeline.
This is already handled correctly by the thin LTO pipeline, but not the full LTO pipeline. This patch effectively makes the pre-link pipelines for thin/full LTO the same. (There is a minor difference in a single GlobalDCE run that possibly shouldn't be there, but I'm leaving it for now.)
https://reviews.llvm.org/D148010
Files:
llvm/include/llvm/Passes/PassBuilder.h
llvm/lib/Passes/PassBuilderPipelines.cpp
llvm/test/Other/new-pm-defaults.ll
llvm/test/Other/new-pm-lto-prelink-defaults.ll
llvm/test/Other/new-pm-thinlto-prelink-defaults.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D148010.512411.patch
Type: text/x-patch
Size: 11658 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230411/355dabbb/attachment.bin>
More information about the llvm-commits
mailing list