diff options
author | Daniel Dunbar <daniel@zuster.org> | 2010-03-14 05:08:59 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2010-03-14 05:08:59 +0000 |
commit | c70345caa213288aa748070f7a03c84fbdf89b5c (patch) | |
tree | 75252446281ec8c9c0a750461b8751fdd73566a8 /lib/Module/Optimize.cpp | |
parent | 5099d8124393dcd577c2dd091834a17fe2d9fcdb (diff) | |
download | klee-c70345caa213288aa748070f7a03c84fbdf89b5c.tar.gz |
Update for 2.7.
git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@98467 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Module/Optimize.cpp')
-rw-r--r-- | lib/Module/Optimize.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Module/Optimize.cpp b/lib/Module/Optimize.cpp index 83e67292..affe9392 100644 --- a/lib/Module/Optimize.cpp +++ b/lib/Module/Optimize.cpp @@ -94,7 +94,9 @@ static void AddStandardCompilePasses(PassManager &PM) { if (DisableOptimizations) return; +#if (LLVM_VERSION_MAJOR == 2 && LLVM_VERSION_MINOR < 7) addPass(PM, createRaiseAllocationsPass()); // call %malloc -> malloc inst +#endif addPass(PM, createCFGSimplificationPass()); // Clean up disgusting code addPass(PM, createPromoteMemoryToRegisterPass());// Kill useless allocas addPass(PM, createGlobalOptimizerPass()); // Optimize out global vars @@ -117,7 +119,9 @@ static void AddStandardCompilePasses(PassManager &PM) { addPass(PM, createCFGSimplificationPass()); // Merge & remove BBs addPass(PM, createScalarReplAggregatesPass()); // Break up aggregate allocas addPass(PM, createInstructionCombiningPass()); // Combine silly seq's +#if (LLVM_VERSION_MAJOR == 2 && LLVM_VERSION_MINOR < 7) addPass(PM, createCondPropagationPass()); // Propagate conditionals +#endif addPass(PM, createTailCallEliminationPass()); // Eliminate tail calls addPass(PM, createCFGSimplificationPass()); // Merge & remove BBs @@ -139,7 +143,9 @@ static void AddStandardCompilePasses(PassManager &PM) { // Run instcombine after redundancy elimination to exploit opportunities // opened up by them. addPass(PM, createInstructionCombiningPass()); +#if (LLVM_VERSION_MAJOR == 2 && LLVM_VERSION_MINOR < 7) addPass(PM, createCondPropagationPass()); // Propagate conditionals +#endif addPass(PM, createDeadStoreEliminationPass()); // Delete dead stores addPass(PM, createAggressiveDCEPass()); // Delete dead instructions |