[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LowerAllocations.cpp LowerInvoke.cpp LowerSelect.cpp LowerSwitch.cpp Mem2Reg.cpp

Chris Lattner lattner at cs.uiuc.edu
Wed May 17 14:05:41 PDT 2006



Changes in directory llvm/lib/Transforms/Scalar:

LowerAllocations.cpp updated: 1.57 -> 1.58
LowerInvoke.cpp updated: 1.35 -> 1.36
LowerSelect.cpp updated: 1.5 -> 1.6
LowerSwitch.cpp updated: 1.20 -> 1.21
Mem2Reg.cpp updated: 1.16 -> 1.17
---
Log message:

Declare that lowerinvoke doesn't interact with other lowering passes.
Patch written by Domagoj Babic!


---
Diffs of the changes:  (+22 -7)

 LowerAllocations.cpp |    3 ++-
 LowerInvoke.cpp      |   10 +++++++++-
 LowerSelect.cpp      |    4 +++-
 LowerSwitch.cpp      |    8 +++++---
 Mem2Reg.cpp          |    4 +++-
 5 files changed, 22 insertions(+), 7 deletions(-)


Index: llvm/lib/Transforms/Scalar/LowerAllocations.cpp
diff -u llvm/lib/Transforms/Scalar/LowerAllocations.cpp:1.57 llvm/lib/Transforms/Scalar/LowerAllocations.cpp:1.58
--- llvm/lib/Transforms/Scalar/LowerAllocations.cpp:1.57	Mon May  8 23:13:41 2006
+++ llvm/lib/Transforms/Scalar/LowerAllocations.cpp	Wed May 17 16:05:27 2006
@@ -41,11 +41,12 @@
       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: llvm/lib/Transforms/Scalar/LowerInvoke.cpp
diff -u llvm/lib/Transforms/Scalar/LowerInvoke.cpp:1.35 llvm/lib/Transforms/Scalar/LowerInvoke.cpp:1.36
--- llvm/lib/Transforms/Scalar/LowerInvoke.cpp:1.35	Sat Nov  5 03:21:28 2005
+++ llvm/lib/Transforms/Scalar/LowerInvoke.cpp	Wed May 17 16:05:27 2006
@@ -71,7 +71,15 @@
       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: llvm/lib/Transforms/Scalar/LowerSelect.cpp
diff -u llvm/lib/Transforms/Scalar/LowerSelect.cpp:1.5 llvm/lib/Transforms/Scalar/LowerSelect.cpp:1.6
--- llvm/lib/Transforms/Scalar/LowerSelect.cpp:1.5	Mon May  8 23:13:41 2006
+++ llvm/lib/Transforms/Scalar/LowerSelect.cpp	Wed May 17 16:05:27 2006
@@ -39,10 +39,12 @@
 
     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: llvm/lib/Transforms/Scalar/LowerSwitch.cpp
diff -u llvm/lib/Transforms/Scalar/LowerSwitch.cpp:1.20 llvm/lib/Transforms/Scalar/LowerSwitch.cpp:1.21
--- llvm/lib/Transforms/Scalar/LowerSwitch.cpp:1.20	Mon May  8 23:13:41 2006
+++ llvm/lib/Transforms/Scalar/LowerSwitch.cpp	Wed May 17 16:05:27 2006
@@ -34,14 +34,16 @@
   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: llvm/lib/Transforms/Scalar/Mem2Reg.cpp
diff -u llvm/lib/Transforms/Scalar/Mem2Reg.cpp:1.16 llvm/lib/Transforms/Scalar/Mem2Reg.cpp:1.17
--- llvm/lib/Transforms/Scalar/Mem2Reg.cpp:1.16	Mon May  8 23:13:41 2006
+++ llvm/lib/Transforms/Scalar/Mem2Reg.cpp	Wed May 17 16:05:27 2006
@@ -38,10 +38,12 @@
       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);
     }
   };
 






More information about the llvm-commits mailing list