diff --git a/include/llvm-c/Transforms/Scalar.h b/include/llvm-c/Transforms/Scalar.h index 473d6cb930f..e45a780c5a5 100644 --- a/include/llvm-c/Transforms/Scalar.h +++ b/include/llvm-c/Transforms/Scalar.h @@ -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); diff --git a/lib/Transforms/Scalar/Scalar.cpp b/lib/Transforms/Scalar/Scalar.cpp index ce678c01082..4e6bc6337cb 100644 --- a/lib/Transforms/Scalar/Scalar.cpp +++ b/lib/Transforms/Scalar/Scalar.cpp @@ -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) {