[llvm-commits] CVS: llvm/lib/VMCore/Function.cpp IntrinsicLowering.cpp Verifier.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sun Jan 4 23:37:00 PST 2004
Changes in directory llvm/lib/VMCore:
Function.cpp updated: 1.58 -> 1.59
IntrinsicLowering.cpp updated: 1.3 -> 1.4
Verifier.cpp updated: 1.74 -> 1.75
---
Log message:
Add VMCore and code generator support for debugging intrinsics. By default
code generators completely ignore them.
---
Diffs of the changes: (+19 -0)
Index: llvm/lib/VMCore/Function.cpp
diff -u llvm/lib/VMCore/Function.cpp:1.58 llvm/lib/VMCore/Function.cpp:1.59
--- llvm/lib/VMCore/Function.cpp:1.58 Fri Nov 21 16:32:23 2003
+++ llvm/lib/VMCore/Function.cpp Sun Jan 4 23:36:30 2004
@@ -207,6 +207,12 @@
if (getName() == alpha_intrinsics[i].name)
return alpha_intrinsics[i].id;
break;
+ case 'd':
+ if (getName() == "llvm.dbg.stoppoint") return Intrinsic::dbg_stoppoint;
+ if (getName() == "llvm.dbg.region.start")return Intrinsic::dbg_region_start;
+ if (getName() == "llvm.dbg.region.end") return Intrinsic::dbg_region_end;
+ if (getName() == "llvm.dbg.func.start") return Intrinsic::dbg_func_start;
+ break;
case 'l':
if (getName() == "llvm.longjmp") return Intrinsic::longjmp;
break;
Index: llvm/lib/VMCore/IntrinsicLowering.cpp
diff -u llvm/lib/VMCore/IntrinsicLowering.cpp:1.3 llvm/lib/VMCore/IntrinsicLowering.cpp:1.4
--- llvm/lib/VMCore/IntrinsicLowering.cpp:1.3 Sun Dec 28 15:23:38 2003
+++ llvm/lib/VMCore/IntrinsicLowering.cpp Sun Jan 4 23:36:30 2004
@@ -48,6 +48,14 @@
// Insert the call to abort
new CallInst(M->getOrInsertFunction("abort", Type::VoidTy, 0), "", CI);
break;
+
+ case Intrinsic::dbg_stoppoint:
+ case Intrinsic::dbg_region_start:
+ case Intrinsic::dbg_region_end:
+ case Intrinsic::dbg_func_start:
+ if (CI->getType() != Type::VoidTy)
+ CI->replaceAllUsesWith(Constant::getNullValue(CI->getType()));
+ break; // Simply strip out debugging intrinsics
}
assert(CI->use_empty() &&
Index: llvm/lib/VMCore/Verifier.cpp
diff -u llvm/lib/VMCore/Verifier.cpp:1.74 llvm/lib/VMCore/Verifier.cpp:1.75
--- llvm/lib/VMCore/Verifier.cpp:1.74 Fri Nov 21 16:32:23 2003
+++ llvm/lib/VMCore/Verifier.cpp Sun Jan 4 23:36:30 2004
@@ -548,6 +548,11 @@
case Intrinsic::longjmp: NumArgs = 2; break;
case Intrinsic::sigsetjmp: NumArgs = 2; break;
case Intrinsic::siglongjmp: NumArgs = 2; break;
+
+ case Intrinsic::dbg_stoppoint: NumArgs = 4; break;
+ case Intrinsic::dbg_region_start:NumArgs = 1; break;
+ case Intrinsic::dbg_region_end: NumArgs = 1; break;
+ case Intrinsic::dbg_func_start: NumArgs = 1; break;
case Intrinsic::alpha_ctlz: NumArgs = 1; break;
case Intrinsic::alpha_cttz: NumArgs = 1; break;
More information about the llvm-commits
mailing list