OSDN Git Service

Declare that lowerinvoke doesn't interact with other lowering passes.
authorChris Lattner <sabre@nondot.org>
Wed, 17 May 2006 21:05:27 +0000 (21:05 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 17 May 2006 21:05:27 +0000 (21:05 +0000)
Patch written by Domagoj Babic!

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

lib/Transforms/Utils/LowerAllocations.cpp
lib/Transforms/Utils/LowerInvoke.cpp
lib/Transforms/Utils/LowerSelect.cpp
lib/Transforms/Utils/LowerSwitch.cpp
lib/Transforms/Utils/Mem2Reg.cpp

index f6e70e1..dab8084 100644 (file)
@@ -41,11 +41,12 @@ namespace {
       AU.addRequired<TargetData>();
       AU.setPreservesCFG();
 
-      // This is a cluster of orthogonal Transforms:
+      // This is a cluster of orthogonal Transforms:   
       AU.addPreserved<UnifyFunctionExitNodes>();
       AU.addPreservedID(PromoteMemoryToRegisterID);
       AU.addPreservedID(LowerSelectID);
       AU.addPreservedID(LowerSwitchID);
+      AU.addPreservedID(LowerInvokePassID);
     }
 
     /// doPassInitialization - For the lower allocations pass, this ensures that
index be706c3..f7cb65c 100644 (file)
@@ -71,7 +71,15 @@ namespace {
       JumpBufAlign(Align) {}
     bool doInitialization(Module &M);
     bool runOnFunction(Function &F);
-    
+    virtual void getAnalysisUsage(AnalysisUsage &AU) const {
+      // This is a cluster of orthogonal Transforms    
+      AU.addPreservedID(PromoteMemoryToRegisterID);
+      AU.addPreservedID(LowerSelectID);
+      AU.addPreservedID(LowerSwitchID);
+      AU.addPreservedID(LowerAllocationsID);
+    }
+       
   private:
     void createAbortMessage();
     void writeAbortMessage(Instruction *IB);
index 27dd430..464d30d 100644 (file)
@@ -39,10 +39,12 @@ namespace {
 
     virtual void getAnalysisUsage(AnalysisUsage &AU) const {
       // This certainly destroys the CFG.
-      // This is a cluster of orthogonal Transforms:
+      // This is a cluster of orthogonal Transforms:   
       AU.addPreserved<UnifyFunctionExitNodes>();
       AU.addPreservedID(PromoteMemoryToRegisterID);
       AU.addPreservedID(LowerSwitchID);
+      AU.addPreservedID(LowerInvokePassID);
+      AU.addPreservedID(LowerAllocationsID);
     }
 
     bool runOnFunction(Function &F);
index 14d3027..379a2e4 100644 (file)
@@ -34,14 +34,16 @@ namespace {
   class LowerSwitch : public FunctionPass {
   public:
     virtual bool runOnFunction(Function &F);
-
+    
     virtual void getAnalysisUsage(AnalysisUsage &AU) const {
-      // This is a cluster of orthogonal Transforms
+      // This is a cluster of orthogonal Transforms    
       AU.addPreserved<UnifyFunctionExitNodes>();
       AU.addPreservedID(PromoteMemoryToRegisterID);
       AU.addPreservedID(LowerSelectID);
+      AU.addPreservedID(LowerInvokePassID);
+      AU.addPreservedID(LowerAllocationsID);
     }
-
+        
     typedef std::pair<Constant*, BasicBlock*> Case;
     typedef std::vector<Case>::iterator       CaseItr;
   private:
index 9ca2c83..5e5d67b 100644 (file)
@@ -38,10 +38,12 @@ namespace {
       AU.addRequired<DominanceFrontier>();
       AU.addRequired<TargetData>();
       AU.setPreservesCFG();
-      // This is a cluster of orthogonal Transforms
+      // This is a cluster of orthogonal Transforms    
       AU.addPreserved<UnifyFunctionExitNodes>();
       AU.addPreservedID(LowerSelectID);
       AU.addPreservedID(LowerSwitchID);
+      AU.addPreservedID(LowerInvokePassID);
+      AU.addPreservedID(LowerAllocationsID);
     }
   };