diff options
Diffstat (limited to 'llvm/lib/Target/XCore/XCoreLowerThreadLocal.cpp')
-rw-r--r-- | llvm/lib/Target/XCore/XCoreLowerThreadLocal.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/Target/XCore/XCoreLowerThreadLocal.cpp b/llvm/lib/Target/XCore/XCoreLowerThreadLocal.cpp index 6528154ab0e2..b5a683de33ab 100644 --- a/llvm/lib/Target/XCore/XCoreLowerThreadLocal.cpp +++ b/llvm/lib/Target/XCore/XCoreLowerThreadLocal.cpp @@ -21,7 +21,6 @@ #include "llvm/IR/IntrinsicsXCore.h" #include "llvm/IR/Module.h" #include "llvm/IR/NoFolder.h" -#include "llvm/IR/ReplaceConstant.h" #include "llvm/IR/ValueHandle.h" #include "llvm/Pass.h" #include "llvm/Support/CommandLine.h" @@ -90,11 +89,11 @@ static bool replaceConstantExprOp(ConstantExpr *CE, Pass *P) { if (PredBB->getTerminator()->getNumSuccessors() > 1) PredBB = SplitEdge(PredBB, PN->getParent()); Instruction *InsertPos = PredBB->getTerminator(); - Instruction *NewInst = createReplacementInstr(CE, InsertPos); + Instruction *NewInst = CE->getAsInstruction(InsertPos); PN->setOperand(I, NewInst); } } else if (Instruction *Instr = dyn_cast<Instruction>(WU)) { - Instruction *NewInst = createReplacementInstr(CE, Instr); + Instruction *NewInst = CE->getAsInstruction(Instr); Instr->replaceUsesOfWith(CE, NewInst); } else { ConstantExpr *CExpr = dyn_cast<ConstantExpr>(WU); @@ -103,7 +102,7 @@ static bool replaceConstantExprOp(ConstantExpr *CE, Pass *P) { } } } while (CE->hasNUsesOrMore(1)); // We need to check because a recursive - // sibling may have used 'CE' when createReplacementInstr was called. + // sibling may have used 'CE' when getAsInstruction was called. CE->destroyConstant(); return true; } |