[llvm-commits] CVS: llvm/lib/Transforms/Instrumentation/RSProfiling.cpp

Reid Spencer reid at x10sys.com
Fri Dec 22 22:07:00 PST 2006



Changes in directory llvm/lib/Transforms/Instrumentation:

RSProfiling.cpp updated: 1.12 -> 1.13
---
Log message:

For PR950: http://llvm.org/PR950 :
This patch removes the SetCC instructions and replaces them with the ICmp
and FCmp instructions. The SetCondInst instruction has been removed and 
been replaced with ICmpInst and FCmpInst.


---
Diffs of the changes:  (+10 -9)

 RSProfiling.cpp |   19 ++++++++++---------
 1 files changed, 10 insertions(+), 9 deletions(-)


Index: llvm/lib/Transforms/Instrumentation/RSProfiling.cpp
diff -u llvm/lib/Transforms/Instrumentation/RSProfiling.cpp:1.12 llvm/lib/Transforms/Instrumentation/RSProfiling.cpp:1.13
--- llvm/lib/Transforms/Instrumentation/RSProfiling.cpp:1.12	Tue Dec 19 16:23:21 2006
+++ llvm/lib/Transforms/Instrumentation/RSProfiling.cpp	Sat Dec 23 00:05:41 2006
@@ -197,9 +197,9 @@
   //decrement counter
   LoadInst* l = new LoadInst(Counter, "counter", t);
   
-  SetCondInst* s = new SetCondInst(Instruction::SetEQ, l, 
-				   ConstantInt::get(T, 0), 
-                                   "countercc", t);
+  ICmpInst* s = new ICmpInst(ICmpInst::ICMP_EQ, l, ConstantInt::get(T, 0), 
+                             "countercc", t);
+
   Value* nv = BinaryOperator::createSub(l, ConstantInt::get(T, 1),
                                      "counternew", t);
   new StoreInst(nv, Counter, t);
@@ -270,9 +270,9 @@
   //decrement counter
   LoadInst* l = new LoadInst(AI, "counter", t);
   
-  SetCondInst* s = new SetCondInst(Instruction::SetEQ, l, 
-				   ConstantInt::get(T, 0), 
-                                   "countercc", t);
+  ICmpInst* s = new ICmpInst(ICmpInst::ICMP_EQ, l, ConstantInt::get(T, 0), 
+                             "countercc", t);
+
   Value* nv = BinaryOperator::createSub(l, ConstantInt::get(T, 1),
                                      "counternew", t);
   new StoreInst(nv, AI, t);
@@ -305,9 +305,10 @@
     BinaryOperator::createAnd(c, ConstantInt::get(Type::ULongTy, rm),
 			      "mrdcc", t);
   
-  SetCondInst* s = new SetCondInst(Instruction::SetEQ, b, 
-				   ConstantInt::get(Type::ULongTy, 0), 
-                                   "mrdccc", t);
+  ICmpInst *s = new ICmpInst(ICmpInst::ICMP_EQ, b,
+                             ConstantInt::get(Type::ULongTy, 0), 
+                             "mrdccc", t);
+
   t->setCondition(s);
 }
 






More information about the llvm-commits mailing list