aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms/Scalar/LICM.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Transforms/Scalar/LICM.cpp')
-rw-r--r--lib/Transforms/Scalar/LICM.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/Transforms/Scalar/LICM.cpp b/lib/Transforms/Scalar/LICM.cpp
index 1c29878..fe37ab4 100644
--- a/lib/Transforms/Scalar/LICM.cpp
+++ b/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);
}
}
}