mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
[AggressiveInstCombine] Add aggressive inst combiner to the LLVM C API.
I just tried to copy what was done for regular InstCombine. Hopefully I didn't miss anything. llvm-svn: 330668
This commit is contained in:
parent
4f77a99095
commit
0a4050d2c1
@ -456,6 +456,9 @@ def register_library(library):
|
||||
library.LLVMInitializeInstCombine.argtypes = [PassRegistry]
|
||||
library.LLVMInitializeInstCombine.restype = None
|
||||
|
||||
library.LLVMInitializeAggressiveInstCombiner.argtypes = [PassRegistry]
|
||||
library.LLVMInitializeAggressiveInstCombiner.restype = None
|
||||
|
||||
library.LLVMInitializeIPO.argtypes = [PassRegistry]
|
||||
library.LLVMInitializeIPO.restype = None
|
||||
|
||||
|
@ -37,6 +37,7 @@ void LLVMInitializeScalarOpts(LLVMPassRegistryRef R);
|
||||
void LLVMInitializeObjCARCOpts(LLVMPassRegistryRef R);
|
||||
void LLVMInitializeVectorization(LLVMPassRegistryRef R);
|
||||
void LLVMInitializeInstCombine(LLVMPassRegistryRef R);
|
||||
void LLVMInitializeAggressiveInstCombiner(LLVMPassRegistryRef R);
|
||||
void LLVMInitializeIPO(LLVMPassRegistryRef R);
|
||||
void LLVMInitializeInstrumentation(LLVMPassRegistryRef R);
|
||||
void LLVMInitializeAnalysis(LLVMPassRegistryRef R);
|
||||
|
@ -35,6 +35,9 @@ extern "C" {
|
||||
/** See llvm::createAggressiveDCEPass function. */
|
||||
void LLVMAddAggressiveDCEPass(LLVMPassManagerRef PM);
|
||||
|
||||
/** See llvm::createAggressiveInstCombinerPass function. */
|
||||
void LLVMAddAggressiveInstCombinerPass(LLVMPassManagerRef PM);
|
||||
|
||||
/** See llvm::createBitTrackingDCEPass function. */
|
||||
void LLVMAddBitTrackingDCEPass(LLVMPassManagerRef PM);
|
||||
|
||||
|
@ -116,6 +116,10 @@ void llvm::initializeAggressiveInstCombine(PassRegistry &Registry) {
|
||||
initializeAggressiveInstCombinerLegacyPassPass(Registry);
|
||||
}
|
||||
|
||||
void LLVMInitializeAggressiveInstCombiner(LLVMPassRegistryRef R) {
|
||||
initializeAggressiveInstCombinerLegacyPassPass(*unwrap(R));
|
||||
}
|
||||
|
||||
FunctionPass *llvm::createAggressiveInstCombinerPass() {
|
||||
return new AggressiveInstCombinerLegacyPass();
|
||||
}
|
||||
|
@ -114,6 +114,10 @@ void LLVMAddAggressiveDCEPass(LLVMPassManagerRef PM) {
|
||||
unwrap(PM)->add(createAggressiveDCEPass());
|
||||
}
|
||||
|
||||
void LLVMAddAggressiveInstCombinerPass(LLVMPassManagerRef PM) {
|
||||
unwrap(PM)->add(createAggressiveInstCombinerPass());
|
||||
}
|
||||
|
||||
void LLVMAddBitTrackingDCEPass(LLVMPassManagerRef PM) {
|
||||
unwrap(PM)->add(createBitTrackingDCEPass());
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user