From: Chris Lattner Date: Wed, 16 Nov 2005 07:22:30 +0000 (+0000) Subject: when debugging lower dbg intrinsics to calls X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=b1a5a5c4c0182205b91b962def7b008228a1f7e6;p=oota-llvm.git when debugging lower dbg intrinsics to calls git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24377 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index 01e76c1b423..53d97e7b7c2 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/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())));