llvm.org GIT mirror llvm / 6f45ebf
[EarlyCSE] Change C API pass interface for EarlyCSE w/ MemorySSA Previous change broke the C API for creating an EarlyCSE pass w/ MemorySSA by adding a bool parameter to control whether MemorySSA was used or not. This broke the OCaml bindings. Instead, change the old C API entry point back and add a new one to request an EarlyCSE pass with MemorySSA. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280379 91177308-0d34-0410-b5e6-96231b3b80d8 Geoff Berry 3 years ago
2 changed file(s) with 10 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
132132 void LLVMAddCorrelatedValuePropagationPass(LLVMPassManagerRef PM);
133133
134134 /** See llvm::createEarlyCSEPass function */
135 void LLVMAddEarlyCSEPass(LLVMPassManagerRef PM, int UseMemorySSA);
135 void LLVMAddEarlyCSEPass(LLVMPassManagerRef PM);
136
137 /** See llvm::createEarlyCSEPass function */
138 void LLVMAddEarlyCSEMemSSAPass(LLVMPassManagerRef PM);
136139
137140 /** See llvm::createLowerExpectIntrinsicPass function */
138141 void LLVMAddLowerExpectIntrinsicPass(LLVMPassManagerRef PM);
233233 unwrap(PM)->add(createCorrelatedValuePropagationPass());
234234 }
235235
236 void LLVMAddEarlyCSEPass(LLVMPassManagerRef PM, int UseMemorySSA) {
237 unwrap(PM)->add(createEarlyCSEPass(UseMemorySSA));
236 void LLVMAddEarlyCSEPass(LLVMPassManagerRef PM) {
237 unwrap(PM)->add(createEarlyCSEPass(false/*=UseMemorySSA*/));
238 }
239
240 void LLVMAddEarlyCSEMemSSAPass(LLVMPassManagerRef PM) {
241 unwrap(PM)->add(createEarlyCSEPass(true/*=UseMemorySSA*/));
238242 }
239243
240244 void LLVMAddGVNHoistLegacyPass(LLVMPassManagerRef PM) {