aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Transforms')
-rw-r--r--lib/Transforms/Utils/LowerAllocations.cpp3
-rw-r--r--lib/Transforms/Utils/LowerInvoke.cpp10
-rw-r--r--lib/Transforms/Utils/LowerSelect.cpp4
-rw-r--r--lib/Transforms/Utils/LowerSwitch.cpp8
-rw-r--r--lib/Transforms/Utils/Mem2Reg.cpp4
5 files changed, 22 insertions, 7 deletions
diff --git a/lib/Transforms/Utils/LowerAllocations.cpp b/lib/Transforms/Utils/LowerAllocations.cpp
index f6e70e11f5..dab8084c4c 100644
--- a/lib/Transforms/Utils/LowerAllocations.cpp
+++ b/lib/Transforms/Utils/LowerAllocations.cpp
@@ -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
diff --git a/lib/Transforms/Utils/LowerInvoke.cpp b/lib/Transforms/Utils/LowerInvoke.cpp
index be706c3ef8..f7cb65c262 100644
--- a/lib/Transforms/Utils/LowerInvoke.cpp
+++ b/lib/Transforms/Utils/LowerInvoke.cpp
@@ -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);
diff --git a/lib/Transforms/Utils/LowerSelect.cpp b/lib/Transforms/Utils/LowerSelect.cpp
index 27dd430728..464d30d030 100644
--- a/lib/Transforms/Utils/LowerSelect.cpp
+++ b/lib/Transforms/Utils/LowerSelect.cpp
@@ -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);
diff --git a/lib/Transforms/Utils/LowerSwitch.cpp b/lib/Transforms/Utils/LowerSwitch.cpp
index 14d3027b91..379a2e4570 100644
--- a/lib/Transforms/Utils/LowerSwitch.cpp
+++ b/lib/Transforms/Utils/LowerSwitch.cpp
@@ -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:
diff --git a/lib/Transforms/Utils/Mem2Reg.cpp b/lib/Transforms/Utils/Mem2Reg.cpp
index 9ca2c8300d..5e5d67b305 100644
--- a/lib/Transforms/Utils/Mem2Reg.cpp
+++ b/lib/Transforms/Utils/Mem2Reg.cpp
@@ -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);
}
};