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 f6e70e11f5f460ef6d9043f2c5bb40cf86d429cd..dab8084c4c8a45deb4b02d745df362accb067b0f 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 be706c3ef8e7c7ec840b65b359ee20ebd8015465..f7cb65c2622807527961bce6ab168896fca99e02 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 27dd4307285d3ff1f9e6f7184da0298e95c5ed0c..464d30d03082bd3dee887ae061cc9e90fb9f8ebd 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 14d3027b918f50228fc2f314a6bf947a9ab16d7b..379a2e45703e591a0890495cfcf26346486f78ca 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 9ca2c8300da918ea03cbdbb14ddfdbd4aa8b658d..5e5d67b305fb3b157287b5d8e7068d16ab12f58c 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);
     }
   };