mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 04:32:44 +01:00
[ConstraintElimination] Tweak placement in pipeline.
This patch adds the ConstraintElimination pass to the LTO pipeline and also runs it after SCCP in the function simplification pipeline. This increases the number of cases we can elimination. Pending further tuning.
This commit is contained in:
parent
e4e35775d8
commit
4b1d72bba8
@ -470,6 +470,9 @@ void PassManagerBuilder::addFunctionSimplificationPasses(
|
||||
MPM.add(createMemCpyOptPass()); // Remove memcpy / form memset
|
||||
MPM.add(createSCCPPass()); // Constant prop with SCCP
|
||||
|
||||
if (EnableConstraintElimination)
|
||||
MPM.add(createConstraintEliminationPass());
|
||||
|
||||
// Delete dead bit computations (instcombine runs after to fold away the dead
|
||||
// computations, and then ADCE will run later to exploit any new DCE
|
||||
// opportunities that creates).
|
||||
@ -1056,6 +1059,9 @@ void PassManagerBuilder::addLTOOptimizationPasses(legacy::PassManagerBase &PM) {
|
||||
if (EnableLoopInterchange)
|
||||
PM.add(createLoopInterchangePass());
|
||||
|
||||
if (EnableConstraintElimination)
|
||||
PM.add(createConstraintEliminationPass());
|
||||
|
||||
// Unroll small loops
|
||||
PM.add(createSimpleLoopUnrollPass(OptLevel, DisableUnrollLoops,
|
||||
ForgetAllSCEVInLoopUnroll));
|
||||
|
Loading…
Reference in New Issue
Block a user