diff options
author | Chris Lattner <sabre@nondot.org> | 2005-11-16 07:22:30 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-11-16 07:22:30 +0000 |
commit | f2b62f317ca1c0bef53b8053414d037b0eb31740 (patch) | |
tree | 836f7a24ab162be79ae56d9ca8a9f26d7bd5bc99 /llvm/lib/CodeGen/SelectionDAG | |
parent | 168fe79229234cfb6aa7936bb4745c3aaba07e26 (diff) | |
download | bcm5719-llvm-f2b62f317ca1c0bef53b8053414d037b0eb31740.tar.gz bcm5719-llvm-f2b62f317ca1c0bef53b8053414d037b0eb31740.zip |
when debugging lower dbg intrinsics to calls
llvm-svn: 24377
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index 01e76c1b423..53d97e7b7c2 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -19,6 +19,7 @@ #include "llvm/Function.h" #include "llvm/Instructions.h" #include "llvm/Intrinsics.h" +#include "llvm/CodeGen/IntrinsicLowering.h" #include "llvm/CodeGen/MachineFunction.h" #include "llvm/CodeGen/MachineFrameInfo.h" #include "llvm/CodeGen/MachineInstrBuilder.h" @@ -780,10 +781,31 @@ SelectionDAGLowering::visitIntrinsicCall(CallInst &I, unsigned Intrinsic) { getRoot(), getValue(I.getOperand(1)), getValue(I.getOperand(2)))); return 0; + case Intrinsic::dbg_stoppoint: + if (TLI.getTargetMachine().getIntrinsicLowering().EmitDebugFunctions()) + return "llvm_debugger_stop"; + if (I.getType() != Type::VoidTy) + setValue(&I, DAG.getNode(ISD::UNDEF, TLI.getValueType(I.getType()))); + return 0; case Intrinsic::dbg_region_start: + if (TLI.getTargetMachine().getIntrinsicLowering().EmitDebugFunctions()) + return "llvm_dbg_region_start"; + if (I.getType() != Type::VoidTy) + setValue(&I, DAG.getNode(ISD::UNDEF, TLI.getValueType(I.getType()))); + return 0; case Intrinsic::dbg_region_end: + if (TLI.getTargetMachine().getIntrinsicLowering().EmitDebugFunctions()) + return "llvm_dbg_region_end"; + if (I.getType() != Type::VoidTy) + setValue(&I, DAG.getNode(ISD::UNDEF, TLI.getValueType(I.getType()))); + return 0; case Intrinsic::dbg_func_start: + if (TLI.getTargetMachine().getIntrinsicLowering().EmitDebugFunctions()) + return "llvm_dbg_subprogram"; + if (I.getType() != Type::VoidTy) + setValue(&I, DAG.getNode(ISD::UNDEF, TLI.getValueType(I.getType()))); + return 0; case Intrinsic::dbg_declare: if (I.getType() != Type::VoidTy) setValue(&I, DAG.getNode(ISD::UNDEF, TLI.getValueType(I.getType()))); |