diff options
author | Chris Lattner <sabre@nondot.org> | 2006-05-09 04:13:41 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-05-09 04:13:41 +0000 |
commit | 8d89e7bdbcea38fe2ab3c85d91359712cd45714b (patch) | |
tree | 6fb84bc94218bfb614ca8dbed7b40671fb7bbbb8 /lib/Transforms/Utils/LowerAllocations.cpp | |
parent | b5d75b8618bd0a9cde51af1f3f48a3d124b23d01 (diff) |
Patch to make some xforms preserve each other. Patch contributed by
Domagoj Babic!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28181 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/LowerAllocations.cpp')
-rw-r--r-- | lib/Transforms/Utils/LowerAllocations.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Transforms/Utils/LowerAllocations.cpp b/lib/Transforms/Utils/LowerAllocations.cpp index 0a6dc09147..f6e70e11f5 100644 --- a/lib/Transforms/Utils/LowerAllocations.cpp +++ b/lib/Transforms/Utils/LowerAllocations.cpp @@ -13,6 +13,7 @@ //===----------------------------------------------------------------------===// #include "llvm/Transforms/Scalar.h" +#include "llvm/Transforms/Utils/UnifyFunctionExitNodes.h" #include "llvm/Module.h" #include "llvm/DerivedTypes.h" #include "llvm/Instructions.h" @@ -39,6 +40,12 @@ namespace { virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired<TargetData>(); AU.setPreservesCFG(); + + // This is a cluster of orthogonal Transforms: + AU.addPreserved<UnifyFunctionExitNodes>(); + AU.addPreservedID(PromoteMemoryToRegisterID); + AU.addPreservedID(LowerSelectID); + AU.addPreservedID(LowerSwitchID); } /// doPassInitialization - For the lower allocations pass, this ensures that |