Move the PromoteMemoryToRegister pass to be run _after_ the raise pointer

references pass, so it is given the chance to do some good!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2089 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2002-04-01 19:45:11 +00:00
parent bb063f38fa
commit 69cd2b1ade

View File

@ -70,11 +70,11 @@ int main(int argc, char **argv) {
PassManager Passes;
Passes.add(createDeadInstEliminationPass()); // Remove Dead code/vars
Passes.add(createRaiseAllocationsPass()); // call %malloc -> malloc inst
Passes.add(createPromoteMemoryToRegister()); // memory->register promotion
Passes.add(createCleanupGCCOutputPass()); // Fix gccisms
Passes.add(createIndVarSimplifyPass()); // Simplify indvars
if (!StopAtLevelRaise) {
Passes.add(createRaisePointerReferencesPass()); // Eliminate casts
Passes.add(createPromoteMemoryToRegister()); // Promote alloca's to regs
Passes.add(createConstantMergePass()); // Merge dup global consts
Passes.add(createInstructionCombiningPass()); // Combine silly seq's
Passes.add(createDeadCodeEliminationPass()); // Remove Dead code/vars