diff options
author | Craig Topper <craig.topper@intel.com> | 2018-04-24 00:39:29 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@intel.com> | 2018-04-24 00:39:29 +0000 |
commit | 1bcb258ba319c380b206c2ab7d9f8baaffcb2058 (patch) | |
tree | a37e3d3620a9977e669b37d8fb1bcf486189fee6 /llvm/lib | |
parent | 8e807bf3fa4157ef16b314c1b0d0e5ddc2c3de88 (diff) | |
download | bcm5719-llvm-1bcb258ba319c380b206c2ab7d9f8baaffcb2058.tar.gz bcm5719-llvm-1bcb258ba319c380b206c2ab7d9f8baaffcb2058.zip |
[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
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp | 4 | ||||
-rw-r--r-- | llvm/lib/Transforms/Scalar/Scalar.cpp | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp b/llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp index 1feeec5d05c..27d2fb0f8e0 100644 --- a/llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp +++ b/llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp @@ -116,6 +116,10 @@ void llvm::initializeAggressiveInstCombine(PassRegistry &Registry) { initializeAggressiveInstCombinerLegacyPassPass(Registry); } +void LLVMInitializeAggressiveInstCombiner(LLVMPassRegistryRef R) { + initializeAggressiveInstCombinerLegacyPassPass(*unwrap(R)); +} + FunctionPass *llvm::createAggressiveInstCombinerPass() { return new AggressiveInstCombinerLegacyPass(); } diff --git a/llvm/lib/Transforms/Scalar/Scalar.cpp b/llvm/lib/Transforms/Scalar/Scalar.cpp index accb30748fe..9541766ca05 100644 --- a/llvm/lib/Transforms/Scalar/Scalar.cpp +++ b/llvm/lib/Transforms/Scalar/Scalar.cpp @@ -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()); } |