diff options
author | Owen Anderson <resistor@mac.com> | 2010-10-07 18:09:59 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2010-10-07 18:09:59 +0000 |
commit | 2c81296bc237cb26c2bb789514e331b3b5b31f79 (patch) | |
tree | 415279daacca31a85744a1352433e60b66d770ac /lib | |
parent | fbd121e1983323a75ae5de78f4b57e939e4c7a38 (diff) | |
download | external_llvm-2c81296bc237cb26c2bb789514e331b3b5b31f79.zip external_llvm-2c81296bc237cb26c2bb789514e331b3b5b31f79.tar.gz external_llvm-2c81296bc237cb26c2bb789514e331b3b5b31f79.tar.bz2 |
Add an initialization routine for libLLVMipo.a
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115933 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Transforms/IPO/IPO.cpp | 39 |
1 files changed, 37 insertions, 2 deletions
diff --git a/lib/Transforms/IPO/IPO.cpp b/lib/Transforms/IPO/IPO.cpp index 340b70e..8793237 100644 --- a/lib/Transforms/IPO/IPO.cpp +++ b/lib/Transforms/IPO/IPO.cpp @@ -7,17 +7,52 @@ // //===----------------------------------------------------------------------===// // -// This file implements the C bindings for libLLVMIPO.a, which implements -// several transformations over the LLVM intermediate representation. +// This file implements the common infrastructure (including C bindings) for +// libLLVMIPO.a, which implements several transformations over the LLVM +// intermediate representation. // //===----------------------------------------------------------------------===// #include "llvm-c/Transforms/IPO.h" +#include "llvm/InitializePasses.h" #include "llvm/PassManager.h" #include "llvm/Transforms/IPO.h" using namespace llvm; +void llvm::initializeIPO(PassRegistry &Registry) { + initializeArgPromotionPass(Registry); + initializeConstantMergePass(Registry); + initializeDAEPass(Registry); + initializeDAHPass(Registry); + initializeDTEPass(Registry); + initializeFunctionAttrsPass(Registry); + initializeGlobalDCEPass(Registry); + initializeGlobalOptPass(Registry); + initializeIPCPPass(Registry); + initializeAlwaysInlinerPass(Registry); + initializeSimpleInlinerPass(Registry); + initializeInternalizePassPass(Registry); + initializeLoopExtractorPass(Registry); + initializeBlockExtractorPassPass(Registry); + initializeSingleLoopExtractorPass(Registry); + initializeLowerSetJmpPass(Registry); + initializeMergeFunctionsPass(Registry); + initializePartialInlinerPass(Registry); + initializePartSpecPass(Registry); + initializePruneEHPass(Registry); + initializeStripDeadPrototypesPassPass(Registry); + initializeStripSymbolsPass(Registry); + initializeStripDebugDeclarePass(Registry); + initializeStripDeadDebugInfoPass(Registry); + initializeStripNonDebugSymbolsPass(Registry); + initializeSRETPromotionPass(Registry); +} + +void LLVMInitializeIPO(LLVMPassRegistryRef R) { + initializeIPO(*unwrap(R)); +} + void LLVMAddArgumentPromotionPass(LLVMPassManagerRef PM) { unwrap(PM)->add(createArgumentPromotionPass()); } |