mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-23 04:01:16 +00:00
Make DBG_STOPPOINT nodes, and therefore DBG_LABEL labels, get a DebugLoc, so that it
shows up in -print-machineinstrs. This doesn't appear to affect anything, but it was weird for some DBG_LABELs to have DebugLocs but not all of them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70921 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
622ed671b9
commit
af29a5235d
@ -302,8 +302,8 @@ public:
|
|||||||
SDValue getArgFlags(ISD::ArgFlagsTy Flags);
|
SDValue getArgFlags(ISD::ArgFlagsTy Flags);
|
||||||
SDValue getValueType(MVT);
|
SDValue getValueType(MVT);
|
||||||
SDValue getRegister(unsigned Reg, MVT VT);
|
SDValue getRegister(unsigned Reg, MVT VT);
|
||||||
SDValue getDbgStopPoint(SDValue Root, unsigned Line, unsigned Col,
|
SDValue getDbgStopPoint(DebugLoc DL, SDValue Root,
|
||||||
Value *CU);
|
unsigned Line, unsigned Col, Value *CU);
|
||||||
SDValue getLabel(unsigned Opcode, DebugLoc dl, SDValue Root,
|
SDValue getLabel(unsigned Opcode, DebugLoc dl, SDValue Root,
|
||||||
unsigned LabelID);
|
unsigned LabelID);
|
||||||
|
|
||||||
|
@ -1273,11 +1273,12 @@ SDValue SelectionDAG::getRegister(unsigned RegNo, MVT VT) {
|
|||||||
return SDValue(N, 0);
|
return SDValue(N, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
SDValue SelectionDAG::getDbgStopPoint(SDValue Root,
|
SDValue SelectionDAG::getDbgStopPoint(DebugLoc DL, SDValue Root,
|
||||||
unsigned Line, unsigned Col,
|
unsigned Line, unsigned Col,
|
||||||
Value *CU) {
|
Value *CU) {
|
||||||
SDNode *N = NodeAllocator.Allocate<DbgStopPointSDNode>();
|
SDNode *N = NodeAllocator.Allocate<DbgStopPointSDNode>();
|
||||||
new (N) DbgStopPointSDNode(Root, Line, Col, CU);
|
new (N) DbgStopPointSDNode(Root, Line, Col, CU);
|
||||||
|
N->setDebugLoc(DL);
|
||||||
AllNodes.push_back(N);
|
AllNodes.push_back(N);
|
||||||
return SDValue(N, 0);
|
return SDValue(N, 0);
|
||||||
}
|
}
|
||||||
|
@ -3889,15 +3889,16 @@ SelectionDAGLowering::visitIntrinsicCall(CallInst &I, unsigned Intrinsic) {
|
|||||||
DbgStopPointInst &SPI = cast<DbgStopPointInst>(I);
|
DbgStopPointInst &SPI = cast<DbgStopPointInst>(I);
|
||||||
if (DIDescriptor::ValidDebugInfo(SPI.getContext(), OptLevel)) {
|
if (DIDescriptor::ValidDebugInfo(SPI.getContext(), OptLevel)) {
|
||||||
MachineFunction &MF = DAG.getMachineFunction();
|
MachineFunction &MF = DAG.getMachineFunction();
|
||||||
|
DICompileUnit CU(cast<GlobalVariable>(SPI.getContext()));
|
||||||
|
DebugLoc Loc = DebugLoc::get(MF.getOrCreateDebugLocID(CU.getGV(),
|
||||||
|
SPI.getLine(), SPI.getColumn()));
|
||||||
|
setCurDebugLoc(Loc);
|
||||||
|
|
||||||
if (OptLevel == CodeGenOpt::None)
|
if (OptLevel == CodeGenOpt::None)
|
||||||
DAG.setRoot(DAG.getDbgStopPoint(getRoot(),
|
DAG.setRoot(DAG.getDbgStopPoint(Loc, getRoot(),
|
||||||
SPI.getLine(),
|
SPI.getLine(),
|
||||||
SPI.getColumn(),
|
SPI.getColumn(),
|
||||||
SPI.getContext()));
|
SPI.getContext()));
|
||||||
DICompileUnit CU(cast<GlobalVariable>(SPI.getContext()));
|
|
||||||
unsigned idx = MF.getOrCreateDebugLocID(CU.getGV(),
|
|
||||||
SPI.getLine(), SPI.getColumn());
|
|
||||||
setCurDebugLoc(DebugLoc::get(idx));
|
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user