[PATCH] D87041: [Bindings] Move LLVMAddInstructionSimplifyPass to Scalar.cpp

Arthur Eubanks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 2 09:24:19 PDT 2020


aeubanks created this revision.
aeubanks added a reviewer: sroland.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
aeubanks requested review of this revision.

Should not be with the pass, but alongside all the other C bindings.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D87041

Files:
  llvm/lib/Transforms/Scalar/InstSimplifyPass.cpp
  llvm/lib/Transforms/Scalar/Scalar.cpp


Index: llvm/lib/Transforms/Scalar/Scalar.cpp
===================================================================
--- llvm/lib/Transforms/Scalar/Scalar.cpp
+++ llvm/lib/Transforms/Scalar/Scalar.cpp
@@ -166,6 +166,10 @@
   unwrap(PM)->add(createIndVarSimplifyPass());
 }
 
+void LLVMAddInstructionSimplifyPass(LLVMPassManagerRef PM) {
+  unwrap(PM)->add(createInstSimplifyLegacyPass());
+}
+
 void LLVMAddJumpThreadingPass(LLVMPassManagerRef PM) {
   unwrap(PM)->add(createJumpThreadingPass());
 }
Index: llvm/lib/Transforms/Scalar/InstSimplifyPass.cpp
===================================================================
--- llvm/lib/Transforms/Scalar/InstSimplifyPass.cpp
+++ 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 @@
   return new InstSimplifyLegacyPass();
 }
 
-void LLVMAddInstructionSimplifyPass(LLVMPassManagerRef PM) {
-  unwrap(PM)->add(createInstSimplifyLegacyPass());
-}
-
 PreservedAnalyses InstSimplifyPass::run(Function &F,
                                         FunctionAnalysisManager &AM) {
   auto &DT = AM.getResult<DominatorTreeAnalysis>(F);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D87041.289491.patch
Type: text/x-patch
Size: 1330 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200902/fd26fb76/attachment.bin>


More information about the llvm-commits mailing list