llvm.org GIT mirror llvm / f7d7c68
[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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330668 91177308-0d34-0410-b5e6-96231b3b80d8 Craig Topper 1 year, 4 months ago
5 changed file(s) with 15 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
455455 library.LLVMInitializeInstCombine.argtypes = [PassRegistry]
456456 library.LLVMInitializeInstCombine.restype = None
457457
458 library.LLVMInitializeAggressiveInstCombiner.argtypes = [PassRegistry]
459 library.LLVMInitializeAggressiveInstCombiner.restype = None
460
458461 library.LLVMInitializeIPO.argtypes = [PassRegistry]
459462 library.LLVMInitializeIPO.restype = None
460463
3636 void LLVMInitializeObjCARCOpts(LLVMPassRegistryRef R);
3737 void LLVMInitializeVectorization(LLVMPassRegistryRef R);
3838 void LLVMInitializeInstCombine(LLVMPassRegistryRef R);
39 void LLVMInitializeAggressiveInstCombiner(LLVMPassRegistryRef R);
3940 void LLVMInitializeIPO(LLVMPassRegistryRef R);
4041 void LLVMInitializeInstrumentation(LLVMPassRegistryRef R);
4142 void LLVMInitializeAnalysis(LLVMPassRegistryRef R);
3333
3434 /** See llvm::createAggressiveDCEPass function. */
3535 void LLVMAddAggressiveDCEPass(LLVMPassManagerRef PM);
36
37 /** See llvm::createAggressiveInstCombinerPass function. */
38 void LLVMAddAggressiveInstCombinerPass(LLVMPassManagerRef PM);
3639
3740 /** See llvm::createBitTrackingDCEPass function. */
3841 void LLVMAddBitTrackingDCEPass(LLVMPassManagerRef PM);
115115 initializeAggressiveInstCombinerLegacyPassPass(Registry);
116116 }
117117
118 void LLVMInitializeAggressiveInstCombiner(LLVMPassRegistryRef R) {
119 initializeAggressiveInstCombinerLegacyPassPass(*unwrap(R));
120 }
121
118122 FunctionPass *llvm::createAggressiveInstCombinerPass() {
119123 return new AggressiveInstCombinerLegacyPass();
120124 }
113113 unwrap(PM)->add(createAggressiveDCEPass());
114114 }
115115
116 void LLVMAddAggressiveInstCombinerPass(LLVMPassManagerRef PM) {
117 unwrap(PM)->add(createAggressiveInstCombinerPass());
118 }
119
116120 void LLVMAddBitTrackingDCEPass(LLVMPassManagerRef PM) {
117121 unwrap(PM)->add(createBitTrackingDCEPass());
118122 }