diff options
| author | Nick Lewycky <nicholas@mxc.ca> | 2009-09-27 07:38:41 +0000 |
|---|---|---|
| committer | Nick Lewycky <nicholas@mxc.ca> | 2009-09-27 07:38:41 +0000 |
| commit | 42fb7452dfbc20c31c97c2d88ef5e6019323377a (patch) | |
| tree | 9916e929fa89b09b0203aa80e5139da35bb63dae /llvm/lib/Transforms/Scalar/LICM.cpp | |
| parent | b56e1ab03368a470159bb7b31c4d96bc016a1cda (diff) | |
| download | bcm5719-llvm-42fb7452dfbc20c31c97c2d88ef5e6019323377a.tar.gz bcm5719-llvm-42fb7452dfbc20c31c97c2d88ef5e6019323377a.zip | |
Instruction::clone does not need to take an LLVMContext&. Remove that and
update all the callers.
llvm-svn: 82889
Diffstat (limited to 'llvm/lib/Transforms/Scalar/LICM.cpp')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/LICM.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
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<AllocaInst*> Allocas; Allocas.push_back(AI); - PromoteMemToReg(Allocas, *DT, *DF, Context, CurAST); + PromoteMemToReg(Allocas, *DT, *DF, I.getContext(), CurAST); } } } |

