[polly] r312875 - [CodegenCleanup] Update cleanup passes according (old) PassManagerBuilder.
Michael Kruse via llvm-commits
llvm-commits at lists.llvm.org
Sat Sep 9 14:43:49 PDT 2017
Author: meinersbur
Date: Sat Sep 9 14:43:49 2017
New Revision: 312875
URL: http://llvm.org/viewvc/llvm-project?rev=312875&view=rev
Log:
[CodegenCleanup] Update cleanup passes according (old) PassManagerBuilder.
Update CodegenCleanup using the function-level passes added by
populatePassManager that run between EP_EarlyAsPossible and
EP_VectorizerStart in -O3.
The changes in particular are:
- Added pass create arguments, e.g. ExpensiveCombines for InstCombine.
- Remove reroll pass. The option -reroll-loops is disabled by default.
- Add passes run with UnitAtATime, which is the default.
- Add instances of LibCallsShrinkWrap, TailCallElimination, SCCP
(sparse conditional constant propagation), Float2Int
that did not run before.
- Add instances of GVN as in the default pipeline.
Notes:
- GVNHoist, GVNSink, NewGVN are still disabled in the -O3 pipeline.
- The optimization level and other optimization parameters are not
accessible outside of PassManagerBuilder, hence we cannot add passes
depending on these.
Differential Revision: https://reviews.llvm.org/D37571
Modified:
polly/trunk/lib/CodeGen/CodegenCleanup.cpp
Modified: polly/trunk/lib/CodeGen/CodegenCleanup.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/CodeGen/CodegenCleanup.cpp?rev=312875&r1=312874&r2=312875&view=diff
==============================================================================
--- polly/trunk/lib/CodeGen/CodegenCleanup.cpp (original)
+++ polly/trunk/lib/CodeGen/CodegenCleanup.cpp Sat Sep 9 14:43:49 2017
@@ -62,36 +62,46 @@ public:
FPM->add(createCFGSimplificationPass());
FPM->add(createSROAPass());
FPM->add(createEarlyCSEPass());
- FPM->add(createInstructionCombiningPass());
+
+ FPM->add(createPromoteMemoryToRegisterPass());
+ FPM->add(createInstructionCombiningPass(true));
+ FPM->add(createCFGSimplificationPass());
+ FPM->add(createSROAPass());
+ FPM->add(createEarlyCSEPass(true));
+ FPM->add(createSpeculativeExecutionIfHasBranchDivergencePass());
FPM->add(createJumpThreadingPass());
FPM->add(createCorrelatedValuePropagationPass());
FPM->add(createCFGSimplificationPass());
- FPM->add(createInstructionCombiningPass());
+ FPM->add(createInstructionCombiningPass(true));
+ FPM->add(createLibCallsShrinkWrapPass());
+ FPM->add(createTailCallEliminationPass());
FPM->add(createCFGSimplificationPass());
FPM->add(createReassociatePass());
- FPM->add(createLoopRotatePass());
+ FPM->add(createLoopRotatePass(-1));
FPM->add(createGVNPass());
FPM->add(createLICMPass());
FPM->add(createLoopUnswitchPass());
FPM->add(createCFGSimplificationPass());
- FPM->add(createInstructionCombiningPass());
+ FPM->add(createInstructionCombiningPass(true));
FPM->add(createIndVarSimplifyPass());
FPM->add(createLoopIdiomPass());
FPM->add(createLoopDeletionPass());
FPM->add(createCFGSimplificationPass());
- FPM->add(createSimpleLoopUnrollPass());
+ FPM->add(createSimpleLoopUnrollPass(3));
FPM->add(createMergedLoadStoreMotionPass());
+ FPM->add(createGVNPass());
FPM->add(createMemCpyOptPass());
+ FPM->add(createSCCPPass());
FPM->add(createBitTrackingDCEPass());
- FPM->add(createInstructionCombiningPass());
+ FPM->add(createInstructionCombiningPass(true));
FPM->add(createJumpThreadingPass());
FPM->add(createCorrelatedValuePropagationPass());
FPM->add(createDeadStoreEliminationPass());
FPM->add(createLICMPass());
- FPM->add(createLoopRerollPass());
FPM->add(createAggressiveDCEPass());
FPM->add(createCFGSimplificationPass());
- FPM->add(createInstructionCombiningPass());
+ FPM->add(createInstructionCombiningPass(true));
+ FPM->add(createFloat2IntPass());
return FPM->doInitialization();
}
More information about the llvm-commits
mailing list