the -debug-pass=Arguments option
* Run instcombining BEFORE mem2reg so that getelementptr X, long 0's are
cleaned up. This is also important because scalar replacement of aggr.
will want instcombine to run before it goes as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3879
91177308-0d34-0410-b5e6-
96231b3b80d8
cl::desc("Only run the first N passes of gccas"), cl::Hidden,
cl::value_desc("# passes"));
cl::desc("Only run the first N passes of gccas"), cl::Hidden,
cl::value_desc("# passes"));
-static cl::opt<bool>
-StopAtLevelRaise("stopraise", cl::desc("Stop optimization before level raise"),
- cl::Hidden);
-
static cl::opt<bool>
Verify("verify", cl::desc("Verify each pass result"));
static cl::opt<bool>
Verify("verify", cl::desc("Verify each pass result"));
addPass(PM, createDeadInstEliminationPass()); // Remove Dead code/vars
addPass(PM, createRaiseAllocationsPass()); // call %malloc -> malloc inst
addPass(PM, createIndVarSimplifyPass()); // Simplify indvars
addPass(PM, createDeadInstEliminationPass()); // Remove Dead code/vars
addPass(PM, createRaiseAllocationsPass()); // call %malloc -> malloc inst
addPass(PM, createIndVarSimplifyPass()); // Simplify indvars
-
- // Level raise is eternally buggy/in need of enhancements. Allow
- // transformation to stop right before it runs.
- if (StopAtLevelRaise) return;
-
addPass(PM, createRaisePointerReferencesPass(TD));// Recover type information
addPass(PM, createRaisePointerReferencesPass(TD));// Recover type information
+ addPass(PM, createInstructionCombiningPass()); // Combine silly seq's
addPass(PM, createPromoteMemoryToRegister()); // Promote alloca's to regs
// Disabling until this is fixed -- Vikram, 7/7/02.
// addPass(PM, createReassociatePass()); // Reassociate expressions
addPass(PM, createPromoteMemoryToRegister()); // Promote alloca's to regs
// Disabling until this is fixed -- Vikram, 7/7/02.
// addPass(PM, createReassociatePass()); // Reassociate expressions
- addPass(PM, createInstructionCombiningPass()); // Combine silly seq's
addPass(PM, createCorrelatedExpressionEliminationPass());
addPass(PM, createInstructionCombiningPass()); // Combine silly seq's
addPass(PM, createCFGSimplificationPass()); // Merge & remove BBs
addPass(PM, createCorrelatedExpressionEliminationPass());
addPass(PM, createInstructionCombiningPass()); // Combine silly seq's
addPass(PM, createCFGSimplificationPass()); // Merge & remove BBs