diff --git a/llvm/include/llvm/IR/ReplaceConstant.h b/llvm/include/llvm/IR/ReplaceConstant.h --- 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 --- 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 *Insts) {