summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Instrumentation/RSProfiling.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2009-07-09 23:48:35 +0000
committerOwen Anderson <resistor@mac.com>2009-07-09 23:48:35 +0000
commit1e5f00e7a7e8bb482a5388464f23d743040d1dbb (patch)
treeed779e935d21d99ee2c292f67a79459c7e82008b /llvm/lib/Transforms/Instrumentation/RSProfiling.cpp
parentab11a81fc07345c0117d2fea2a9e4f7c4df21d66 (diff)
downloadbcm5719-llvm-1e5f00e7a7e8bb482a5388464f23d743040d1dbb.tar.gz
bcm5719-llvm-1e5f00e7a7e8bb482a5388464f23d743040d1dbb.zip
This started as a small change, I swear. Unfortunately, lots of things call the [I|F]CmpInst constructors. Who knew!?
llvm-svn: 75200
Diffstat (limited to 'llvm/lib/Transforms/Instrumentation/RSProfiling.cpp')
-rw-r--r--llvm/lib/Transforms/Instrumentation/RSProfiling.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/RSProfiling.cpp b/llvm/lib/Transforms/Instrumentation/RSProfiling.cpp
index 51012209539..c1f29fec55f 100644
--- a/llvm/lib/Transforms/Instrumentation/RSProfiling.cpp
+++ b/llvm/lib/Transforms/Instrumentation/RSProfiling.cpp
@@ -213,9 +213,9 @@ void GlobalRandomCounter::ProcessChoicePoint(BasicBlock* bb) {
//decrement counter
LoadInst* l = new LoadInst(Counter, "counter", t);
- ICmpInst* s = new ICmpInst(ICmpInst::ICMP_EQ, l,
+ ICmpInst* s = new ICmpInst(t, ICmpInst::ICMP_EQ, l,
Context->getConstantInt(T, 0),
- "countercc", t);
+ "countercc");
Value* nv = BinaryOperator::CreateSub(l, Context->getConstantInt(T, 1),
"counternew", t);
@@ -287,9 +287,9 @@ void GlobalRandomCounterOpt::ProcessChoicePoint(BasicBlock* bb) {
//decrement counter
LoadInst* l = new LoadInst(AI, "counter", t);
- ICmpInst* s = new ICmpInst(ICmpInst::ICMP_EQ, l,
+ ICmpInst* s = new ICmpInst(t, ICmpInst::ICMP_EQ, l,
Context->getConstantInt(T, 0),
- "countercc", t);
+ "countercc");
Value* nv = BinaryOperator::CreateSub(l, Context->getConstantInt(T, 1),
"counternew", t);
@@ -324,9 +324,9 @@ void CycleCounter::ProcessChoicePoint(BasicBlock* bb) {
BinaryOperator::CreateAnd(c, Context->getConstantInt(Type::Int64Ty, rm),
"mrdcc", t);
- ICmpInst *s = new ICmpInst(ICmpInst::ICMP_EQ, b,
+ ICmpInst *s = new ICmpInst(t, ICmpInst::ICMP_EQ, b,
Context->getConstantInt(Type::Int64Ty, 0),
- "mrdccc", t);
+ "mrdccc");
t->setCondition(s);
}
@@ -394,7 +394,7 @@ Value* ProfilerRS::Translate(Value* v) {
return i;
} else {
//translate this
- Instruction* i2 = i->clone();
+ Instruction* i2 = i->clone(*Context);
if (i->hasName())
i2->setName("dup_" + i->getName());
TransCache[i] = i2;
OpenPOWER on IntegriCloud