diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2008-11-02 05:52:50 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2008-11-02 05:52:50 +0000 |
commit | 579a0246616d76bc536de0e41edf069d091604be (patch) | |
tree | 2d39570a32af93de6f9d8e9b15240f4b9eb2744a /include | |
parent | 8e39432ea9751917d5cef1f18f6c32382c384d58 (diff) | |
download | external_llvm-579a0246616d76bc536de0e41edf069d091604be.zip external_llvm-579a0246616d76bc536de0e41edf069d091604be.tar.gz external_llvm-579a0246616d76bc536de0e41edf069d091604be.tar.bz2 |
Add a new MergeFunctions pass. It finds identical functions and merges them.
This triggers only 60 times in llvm-test (look at .llvm.bc, not .linked.rbc)
and so it probably wont be turned on by default. Also, may of those are likely
to go away when PR2973 is fixed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58557 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/LinkAllPasses.h | 1 | ||||
-rw-r--r-- | include/llvm/Transforms/IPO.h | 12 |
2 files changed, 10 insertions, 3 deletions
diff --git a/include/llvm/LinkAllPasses.h b/include/llvm/LinkAllPasses.h index e23108c..4dbfa26 100644 --- a/include/llvm/LinkAllPasses.h +++ b/include/llvm/LinkAllPasses.h @@ -121,6 +121,7 @@ namespace { (void) llvm::createInstructionNamerPass(); (void) llvm::createPartialSpecializationPass(); (void) llvm::createAddReadAttrsPass(); + (void) llvm::createMergeFunctionsPass(); (void) llvm::createPrintModulePass(0); (void) llvm::createPrintFunctionPass("", 0); diff --git a/include/llvm/Transforms/IPO.h b/include/llvm/Transforms/IPO.h index ac8da77..8876140 100644 --- a/include/llvm/Transforms/IPO.h +++ b/include/llvm/Transforms/IPO.h @@ -38,7 +38,7 @@ ModulePass *createStripSymbolsPass(bool OnlyDebugInfo = false); /// to invoke/unwind instructions. This should really be part of the C/C++ /// front-end, but it's so much easier to write transformations in LLVM proper. /// -ModulePass* createLowerSetJmpPass(); +ModulePass *createLowerSetJmpPass(); //===----------------------------------------------------------------------===// /// createConstantMergePass - This function returns a new pass that merges @@ -186,13 +186,19 @@ ModulePass *createStripDeadPrototypesPass(); /// createPartialSpecializationPass - This pass specializes functions for /// constant arguments. /// -ModulePass* createPartialSpecializationPass(); +ModulePass *createPartialSpecializationPass(); //===----------------------------------------------------------------------===// /// createAddReadAttrsPass - This pass discovers functions that do not access /// memory, or only read memory, and gives them the readnone/readonly attribute. /// -Pass* createAddReadAttrsPass(); +Pass *createAddReadAttrsPass(); + +//===----------------------------------------------------------------------===// +/// createMergeFunctionsPass - This pass discovers identical functions and +/// collapses them. +/// +ModulePass *createMergeFunctionsPass(); } // End llvm namespace |