From 42fb7452dfbc20c31c97c2d88ef5e6019323377a Mon Sep 17 00:00:00 2001 From: Nick Lewycky Date: Sun, 27 Sep 2009 07:38:41 +0000 Subject: Instruction::clone does not need to take an LLVMContext&. Remove that and update all the callers. llvm-svn: 82889 --- llvm/lib/Transforms/Scalar/LICM.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'llvm/lib/Transforms/Scalar/LICM.cpp') diff --git a/llvm/lib/Transforms/Scalar/LICM.cpp b/llvm/lib/Transforms/Scalar/LICM.cpp index 1c298785da8..fe37ab4caa1 100644 --- a/llvm/lib/Transforms/Scalar/LICM.cpp +++ b/llvm/lib/Transforms/Scalar/LICM.cpp @@ -36,7 +36,6 @@ #include "llvm/Constants.h" #include "llvm/DerivedTypes.h" #include "llvm/Instructions.h" -#include "llvm/LLVMContext.h" #include "llvm/Target/TargetData.h" #include "llvm/Analysis/LoopInfo.h" #include "llvm/Analysis/LoopPass.h" @@ -476,8 +475,6 @@ void LICM::sink(Instruction &I) { ++NumSunk; Changed = true; - LLVMContext &Context = I.getContext(); - // The case where there is only a single exit node of this loop is common // enough that we handle it as a special (more efficient) case. It is more // efficient to handle because there are no PHI nodes that need to be placed. @@ -573,7 +570,7 @@ void LICM::sink(Instruction &I) { ExitBlock->getInstList().insert(InsertPt, &I); New = &I; } else { - New = I.clone(Context); + New = I.clone(); CurAST->copyValue(&I, New); if (!I.getName().empty()) New->setName(I.getName()+".le"); @@ -596,7 +593,7 @@ void LICM::sink(Instruction &I) { if (AI) { std::vector Allocas; Allocas.push_back(AI); - PromoteMemToReg(Allocas, *DT, *DF, Context, CurAST); + PromoteMemToReg(Allocas, *DT, *DF, I.getContext(), CurAST); } } } -- cgit v1.2.3