[llvm] 56f03d2 - [IR] Remove createReplacementInstr. NFC.

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 29 07:18:16 PDT 2021


Author: Jay Foad
Date: 2021-10-29T15:03:19+01:00
New Revision: 56f03d25b42ac539c046e157e99ad824d0239dd0

URL: https://github.com/llvm/llvm-project/commit/56f03d25b42ac539c046e157e99ad824d0239dd0
DIFF: https://github.com/llvm/llvm-project/commit/56f03d25b42ac539c046e157e99ad824d0239dd0.diff

LOG: [IR] Remove createReplacementInstr. NFC.

It is unused since D112791.

Differential Revision: https://reviews.llvm.org/D112795

Added: 
    

Modified: 
    llvm/include/llvm/IR/ReplaceConstant.h
    llvm/lib/IR/ReplaceConstant.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/IR/ReplaceConstant.h b/llvm/include/llvm/IR/ReplaceConstant.h
index 4d95143a4bd2..5ad1d0a6f920 100644
--- a/llvm/include/llvm/IR/ReplaceConstant.h
+++ b/llvm/include/llvm/IR/ReplaceConstant.h
@@ -21,10 +21,6 @@
 
 namespace llvm {
 
-/// Create a replacement instruction for constant expression \p CE and insert
-/// it before \p Instr.
-Instruction *createReplacementInstr(ConstantExpr *CE, Instruction *Instr);
-
 /// The given instruction \p I contains given constant expression \p CE as one
 /// of its operands, possibly nested within constant expression trees. Convert
 /// all reachable paths from contant expression operands of \p I to \p CE into

diff  --git a/llvm/lib/IR/ReplaceConstant.cpp b/llvm/lib/IR/ReplaceConstant.cpp
index e979c905445e..51f0d2738f7e 100644
--- a/llvm/lib/IR/ReplaceConstant.cpp
+++ b/llvm/lib/IR/ReplaceConstant.cpp
@@ -17,11 +17,6 @@
 #include "llvm/IR/NoFolder.h"
 
 namespace llvm {
-// Replace a constant expression by instructions with equivalent operations at
-// a specified location.
-Instruction *createReplacementInstr(ConstantExpr *CE, Instruction *Instr) {
-  return CE->getAsInstruction(Instr);
-}
 
 void convertConstantExprsToInstructions(Instruction *I, ConstantExpr *CE,
                                         SmallPtrSetImpl<Instruction *> *Insts) {


        


More information about the llvm-commits mailing list