[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
This commit is contained in:
Geoff Berry 2016-09-01 15:07:46 +00:00
parent f27163fda4
commit 6f45ebf800
2 changed files with 10 additions and 3 deletions

View File

@ -133,7 +133,10 @@ void LLVMAddVerifierPass(LLVMPassManagerRef PM);
void LLVMAddCorrelatedValuePropagationPass(LLVMPassManagerRef PM);
/** See llvm::createEarlyCSEPass function */
void LLVMAddEarlyCSEPass(LLVMPassManagerRef PM, int UseMemorySSA);
void LLVMAddEarlyCSEPass(LLVMPassManagerRef PM);
/** See llvm::createEarlyCSEPass function */
void LLVMAddEarlyCSEMemSSAPass(LLVMPassManagerRef PM);
/** See llvm::createLowerExpectIntrinsicPass function */
void LLVMAddLowerExpectIntrinsicPass(LLVMPassManagerRef PM);

View File

@ -234,8 +234,12 @@ void LLVMAddCorrelatedValuePropagationPass(LLVMPassManagerRef PM) {
unwrap(PM)->add(createCorrelatedValuePropagationPass());
}
void LLVMAddEarlyCSEPass(LLVMPassManagerRef PM, int UseMemorySSA) {
unwrap(PM)->add(createEarlyCSEPass(UseMemorySSA));
void LLVMAddEarlyCSEPass(LLVMPassManagerRef PM) {
unwrap(PM)->add(createEarlyCSEPass(false/*=UseMemorySSA*/));
}
void LLVMAddEarlyCSEMemSSAPass(LLVMPassManagerRef PM) {
unwrap(PM)->add(createEarlyCSEPass(true/*=UseMemorySSA*/));
}
void LLVMAddGVNHoistLegacyPass(LLVMPassManagerRef PM) {