Stop explicitly scheduling domfrontier before the loop passes,
authorChris Lattner <sabre@nondot.org>
Sun, 29 Aug 2010 07:05:51 +0000 (07:05 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 29 Aug 2010 07:05:51 +0000 (07:05 +0000)
since none of them use it.  With this, we now only run
domfrontier (an N^2 analysis) 3 times at clang -O3: once for
"early" per-function cleanup, once at the start of the
per-function pipeline to support SRoA, and once late because
the EHPrepare class uses it.

EHPrepare needs to stop using it, this is silly and wasteful.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112420 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/StandardPasses.h

index 3b2fbf04123dbf525b3feef7ecc08a1556be459f..9df8a650e9d98627610bd83046bb5cf25ceb63a8 100644 (file)
@@ -117,7 +117,6 @@ namespace llvm {
       PM->add(createArgumentPromotionPass());   // Scalarize uninlined fn args
     
     // Start of function pass.
-    
     PM->add(createScalarReplAggregatesPass());  // Break up aggregate allocas
     if (SimplifyLibCalls)
       PM->add(createSimplifyLibCallsPass());    // Library Call Optimizations
@@ -129,8 +128,6 @@ namespace llvm {
     PM->add(createTailCallEliminationPass());   // Eliminate tail calls
     PM->add(createCFGSimplificationPass());     // Merge & remove BBs
     PM->add(createReassociatePass());           // Reassociate expressions
-    // Explicitly schedule this to ensure that it runs before any loop pass.
-    PM->add(new DominanceFrontier());           // Calculate Dominance Frontiers
     PM->add(createLoopRotatePass());            // Rotate Loop
     PM->add(createLICMPass());                  // Hoist loop invariants
     PM->add(createLoopUnswitchPass(OptimizeSize || OptimizationLevel < 3));