diff options
author | Florian Hahn <flo@fhahn.com> | 2023-09-22 14:31:07 +0100 |
---|---|---|
committer | Florian Hahn <flo@fhahn.com> | 2023-09-22 14:31:08 +0100 |
commit | 04f9a8a7d67d18d42d0a7f0073d8c22e52f6de18 (patch) | |
tree | dc65dc5f28105adf4636c792acd7301f914cc2d8 /llvm/lib/Passes/PassBuilderPipelines.cpp | |
parent | caa2a4ae6a5e6362b4b1090e8a23c0126fd7448f (diff) | |
download | llvm-04f9a8a7d67d18d42d0a7f0073d8c22e52f6de18.zip llvm-04f9a8a7d67d18d42d0a7f0073d8c22e52f6de18.tar.gz llvm-04f9a8a7d67d18d42d0a7f0073d8c22e52f6de18.tar.bz2 |
[ConstraintElim] Move just before loop simplification pipeline.
Adjust the pipeline slightly to move ConstraintElim just before the loop
simplification pipeline. This increases the number of cases where SCEV
should can preserved in the future.
This also enables slightly more opportunities, by benefiting from
earlier CFG simplifications, which allow more conditions to be added.
Reviewed By: nikic, antoniofrighetto
Differential Revision: https://reviews.llvm.org/D158843
Diffstat (limited to 'llvm/lib/Passes/PassBuilderPipelines.cpp')
-rw-r--r-- | llvm/lib/Passes/PassBuilderPipelines.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Passes/PassBuilderPipelines.cpp b/llvm/lib/Passes/PassBuilderPipelines.cpp index 5f5d92d..2cc7d43 100644 --- a/llvm/lib/Passes/PassBuilderPipelines.cpp +++ b/llvm/lib/Passes/PassBuilderPipelines.cpp @@ -557,9 +557,6 @@ PassBuilder::buildFunctionSimplificationPipeline(OptimizationLevel Level, FPM.addPass(InstCombinePass()); FPM.addPass(AggressiveInstCombinePass()); - if (EnableConstraintElimination) - FPM.addPass(ConstraintEliminationPass()); - if (!Level.isOptimizingForSize()) FPM.addPass(LibCallsShrinkWrapPass()); @@ -580,6 +577,9 @@ PassBuilder::buildFunctionSimplificationPipeline(OptimizationLevel Level, // minimal multiplication trees. FPM.addPass(ReassociatePass()); + if (EnableConstraintElimination) + FPM.addPass(ConstraintEliminationPass()); + // Add the primary loop simplification pipeline. // FIXME: Currently this is split into two loop pass pipelines because we run // some function passes in between them. These can and should be removed |