[llvm] 352cf57 - [Bindings] Move LLVMAddInstructionSimplifyPass to Scalar.cpp
Arthur Eubanks via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 2 10:36:01 PDT 2020
Author: Arthur Eubanks
Date: 2020-09-02T10:35:39-07:00
New Revision: 352cf57cfb6ad33a95ff2d80109e1e88aa39b77e
URL: https://github.com/llvm/llvm-project/commit/352cf57cfb6ad33a95ff2d80109e1e88aa39b77e
DIFF: https://github.com/llvm/llvm-project/commit/352cf57cfb6ad33a95ff2d80109e1e88aa39b77e.diff
LOG: [Bindings] Move LLVMAddInstructionSimplifyPass to Scalar.cpp
Should not be with the pass, but alongside all the other C bindings.
Reviewed By: sroland
Differential Revision: https://reviews.llvm.org/D87041
Added:
Modified:
llvm/lib/Transforms/Scalar/InstSimplifyPass.cpp
llvm/lib/Transforms/Scalar/Scalar.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Scalar/InstSimplifyPass.cpp b/llvm/lib/Transforms/Scalar/InstSimplifyPass.cpp
index 76e3f7859f08a..c11d2e4c1d6b9 100644
--- a/llvm/lib/Transforms/Scalar/InstSimplifyPass.cpp
+++ b/llvm/lib/Transforms/Scalar/InstSimplifyPass.cpp
@@ -17,7 +17,6 @@
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/Dominators.h"
#include "llvm/IR/Function.h"
-#include "llvm/IR/LegacyPassManager.h"
#include "llvm/IR/Type.h"
#include "llvm/InitializePasses.h"
#include "llvm/Pass.h"
@@ -131,10 +130,6 @@ FunctionPass *llvm::createInstSimplifyLegacyPass() {
return new InstSimplifyLegacyPass();
}
-void LLVMAddInstructionSimplifyPass(LLVMPassManagerRef PM) {
- unwrap(PM)->add(createInstSimplifyLegacyPass());
-}
-
PreservedAnalyses InstSimplifyPass::run(Function &F,
FunctionAnalysisManager &AM) {
auto &DT = AM.getResult<DominatorTreeAnalysis>(F);
diff --git a/llvm/lib/Transforms/Scalar/Scalar.cpp b/llvm/lib/Transforms/Scalar/Scalar.cpp
index 55b9dd7482cc3..f4dc6f2996b98 100644
--- a/llvm/lib/Transforms/Scalar/Scalar.cpp
+++ b/llvm/lib/Transforms/Scalar/Scalar.cpp
@@ -166,6 +166,10 @@ void LLVMAddIndVarSimplifyPass(LLVMPassManagerRef PM) {
unwrap(PM)->add(createIndVarSimplifyPass());
}
+void LLVMAddInstructionSimplifyPass(LLVMPassManagerRef PM) {
+ unwrap(PM)->add(createInstSimplifyLegacyPass());
+}
+
void LLVMAddJumpThreadingPass(LLVMPassManagerRef PM) {
unwrap(PM)->add(createJumpThreadingPass());
}
More information about the llvm-commits
mailing list