diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2011-05-19 19:14:54 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2011-05-19 19:14:54 +0000 |
commit | 097f9a94f660f99ea2aad62da301e8409af391a7 (patch) | |
tree | aa646700313ab44f78acb321626ba0fa08c0aa09 | |
parent | 0efaa5e6a184cd6658aebc9873462ee60262a6bd (diff) |
Fix up the new StandardPasses to run the same scalarrepl passes as the old one.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131665 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/Support/StandardPasses.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/include/llvm/Support/StandardPasses.h b/include/llvm/Support/StandardPasses.h index 8e323009c8..cfea5be946 100644 --- a/include/llvm/Support/StandardPasses.h +++ b/include/llvm/Support/StandardPasses.h @@ -62,6 +62,9 @@ namespace llvm { /// Passes must be registered with functions that take no arguments, so we have /// to wrap their existing constructors. static Pass *createScalarReplAggregatesPass(void) { + return llvm::createScalarReplAggregatesPass(); + } + static Pass *createSSAScalarReplAggregatesPass(void) { return llvm::createScalarReplAggregatesPass(-1, false); } static Pass *createDefaultLoopUnswitchPass(void) { @@ -138,7 +141,10 @@ namespace llvm { DEFAULT_MODULE_PASS(ArgumentPromotion, StandardPass::OptimzationFlags(3)); // Start of function pass. // Break up aggregate allocas, using SSAUpdater. - DEFAULT_MODULE_PASS(ScalarReplAggregates, 0); + StandardPass::RegisterDefaultPass( + CreatePassFn(createSSAScalarReplAggregatesPass), + &DefaultStandardPasses::ScalarReplAggregatesID, 0, + StandardPass::Module, 0); // Catch trivial redundancies DEFAULT_MODULE_PASS(EarlyCSE, 0); // Library Call Optimizations @@ -164,21 +170,21 @@ namespace llvm { DEFAULT_MODULE_PASS(LICM, 0); // Optimize for size if the optimzation level is 0-2 StandardPass::RegisterDefaultPass( - PassInfo::NormalCtor_t(createSizeOptimizingLoopUnswitchPass), + CreatePassFn(createSizeOptimizingLoopUnswitchPass), &DefaultStandardPasses::LoopUnswitchID, 0, StandardPass::Module, StandardPass::OptimzationFlags(0, 2)); // Optimize for size if the optimzation level is >2, and OptimizeSize is // set StandardPass::RegisterDefaultPass( - PassInfo::NormalCtor_t(createSizeOptimizingLoopUnswitchPass), + CreatePassFn(createSizeOptimizingLoopUnswitchPass), &DefaultStandardPasses::LoopUnswitchID, 0, StandardPass::Module, StandardPass::OptimzationFlags(3, 0, StandardPass::OptimizeSize)); // Don't optimize for size if optimisation level is >2 and OptimizeSize // is not set StandardPass::RegisterDefaultPass( - PassInfo::NormalCtor_t(createDefaultLoopUnswitchPass), + CreatePassFn(createDefaultLoopUnswitchPass), &DefaultStandardPasses::LoopUnswitchID, 0, StandardPass::Module, StandardPass::OptimzationFlags(3, 0, 0, StandardPass::OptimizeSize)); |