Move the PromoteMemoryToRegister pass to be run _after_ the raise pointer
authorChris Lattner <sabre@nondot.org>
Mon, 1 Apr 2002 19:45:11 +0000 (19:45 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 1 Apr 2002 19:45:11 +0000 (19:45 +0000)
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

tools/gccas/gccas.cpp

index 235dadf4fa05cf184e06d8609547e71e7dfec026..3f52e004f67cdd2ee2af0ac1f95f8833216ddb10 100644 (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