forked from OSchip/llvm-project
Add an initialization routine for libLLVMipo.a
llvm-svn: 115933
This commit is contained in:
parent
383fec5d99
commit
bf70a035f0
|
@ -24,6 +24,7 @@ extern "C" {
|
|||
|
||||
void LLVMInitializeTransformUtils(LLVMPassRegistryRef R);
|
||||
void LLVMInitializeScalarOpts(LLVMPassRegistryRef R);
|
||||
void LLVMInitializeIPO(LLVMPassRegistryRef R);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -19,14 +19,17 @@ namespace llvm {
|
|||
|
||||
class PassRegistry;
|
||||
|
||||
/// initializeTransformUtilsPasses - Initialize all passes linked into the
|
||||
/// initializeTransformUtils - Initialize all passes linked into the
|
||||
/// TransformUtils library.
|
||||
void initializeTransformUtils(PassRegistry&);
|
||||
|
||||
/// initializeScalarOptsPasses - Initialize all passes linked into the
|
||||
/// initializeScalarOpts - Initialize all passes linked into the
|
||||
/// ScalarOpts library.
|
||||
void initializeScalarOpts(PassRegistry&);
|
||||
|
||||
/// initializeIPO - Initialize all passes linked into the IPO library.
|
||||
void initializeIPO(PassRegistry&);
|
||||
|
||||
void initializeAAEvalPass(PassRegistry&);
|
||||
void initializeADCEPass(PassRegistry&);
|
||||
void initializeAliasAnalysisAnalysisGroup(PassRegistry&);
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue