[PATCH] D86764: [Bindings] Add LLVMAddInstructionSimplifyPass

Arthur Eubanks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 1 12:39:26 PDT 2020


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG96f0b57568c3: [Bindings] Add LLVMAddInstructionSimplifyPass (authored by aeubanks).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D86764/new/

https://reviews.llvm.org/D86764

Files:
  llvm/docs/ReleaseNotes.rst
  llvm/include/llvm-c/Transforms/Scalar.h
  llvm/lib/Transforms/Scalar/InstSimplifyPass.cpp


Index: llvm/lib/Transforms/Scalar/InstSimplifyPass.cpp
===================================================================
--- llvm/lib/Transforms/Scalar/InstSimplifyPass.cpp
+++ llvm/lib/Transforms/Scalar/InstSimplifyPass.cpp
@@ -17,12 +17,14 @@
 #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"
 #include "llvm/Transforms/Scalar.h"
 #include "llvm/Transforms/Utils.h"
 #include "llvm/Transforms/Utils/Local.h"
+
 using namespace llvm;
 
 #define DEBUG_TYPE "instsimplify"
@@ -129,6 +131,10 @@
   return new InstSimplifyLegacyPass();
 }
 
+void LLVMAddInstructionSimplifyPass(LLVMPassManagerRef PM) {
+  unwrap(PM)->add(createInstSimplifyLegacyPass());
+}
+
 PreservedAnalyses InstSimplifyPass::run(Function &F,
                                         FunctionAnalysisManager &AM) {
   auto &DT = AM.getResult<DominatorTreeAnalysis>(F);
Index: llvm/include/llvm-c/Transforms/Scalar.h
===================================================================
--- llvm/include/llvm-c/Transforms/Scalar.h
+++ llvm/include/llvm-c/Transforms/Scalar.h
@@ -67,6 +67,9 @@
 /** See llvm::createInstructionCombiningPass function. */
 void LLVMAddInstructionCombiningPass(LLVMPassManagerRef PM);
 
+/** See llvm::createInstSimplifyLegacyPass function. */
+void LLVMAddInstructionSimplifyPass(LLVMPassManagerRef PM);
+
 /** See llvm::createJumpThreadingPass function. */
 void LLVMAddJumpThreadingPass(LLVMPassManagerRef PM);
 
Index: llvm/docs/ReleaseNotes.rst
===================================================================
--- llvm/docs/ReleaseNotes.rst
+++ llvm/docs/ReleaseNotes.rst
@@ -40,7 +40,8 @@
    functionality, or simply have a lot to talk about), see the `NOTE` below
    for adding a new subsection.
 
-* ...
+* The ConstantPropagation pass was removed. Users should use the InstSimplify
+  pass instead.
 
 
 .. NOTE


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86764.289254.patch
Type: text/x-patch
Size: 1996 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200901/d0a09a29/attachment.bin>


More information about the llvm-commits mailing list