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

Reid Spencer reid at x10sys.com
Tue Dec 12 16:50:43 PST 2006



Changes in directory llvm/lib/Transforms/Instrumentation:

ProfilingUtils.cpp updated: 1.9 -> 1.10
TraceValues.cpp updated: 1.77 -> 1.78
---
Log message:

Replace CastInst::createInferredCast calls with more accurate cast
creation calls.


---
Diffs of the changes:  (+3 -2)

 ProfilingUtils.cpp |    1 +
 TraceValues.cpp    |    4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)


Index: llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp
diff -u llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp:1.9 llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp:1.10
--- llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp:1.9	Sun Nov 26 19:05:10 2006
+++ llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp	Tue Dec 12 18:50:17 2006
@@ -67,6 +67,7 @@
     } else {
       InitCall->setOperand(2, AI);
     }
+    /* FALL THROUGH */
 
   case 1:
     AI = MainFn->arg_begin();


Index: llvm/lib/Transforms/Instrumentation/TraceValues.cpp
diff -u llvm/lib/Transforms/Instrumentation/TraceValues.cpp:1.77 llvm/lib/Transforms/Instrumentation/TraceValues.cpp:1.78
--- llvm/lib/Transforms/Instrumentation/TraceValues.cpp:1.77	Sun Nov 26 19:05:10 2006
+++ llvm/lib/Transforms/Instrumentation/TraceValues.cpp	Tue Dec 12 18:50:17 2006
@@ -281,7 +281,7 @@
 
   const Type *SBP = PointerType::get(Type::SByteTy);
   if (V->getType() != SBP)    // Cast pointer to be sbyte*
-    V = CastInst::createInferredCast(V, SBP, "RPSN_cast", InsertBefore);
+    V = new BitCastInst(V, SBP, "RPSN_cast", InsertBefore);
 
   std::vector<Value*> releaseArgs(1, V);
   new CallInst(ReleasePtrFunc, releaseArgs, "", InsertBefore);
@@ -293,7 +293,7 @@
                  Function* RecordPtrFunc) {
     const Type *SBP = PointerType::get(Type::SByteTy);
   if (V->getType() != SBP)     // Cast pointer to be sbyte*
-    V = CastInst::createInferredCast(V, SBP, "RP_cast", InsertBefore);
+    V = new BitCastInst(V, SBP, "RP_cast", InsertBefore);
 
   std::vector<Value*> releaseArgs(1, V);
   new CallInst(RecordPtrFunc, releaseArgs, "", InsertBefore);






More information about the llvm-commits mailing list