summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.h
diff options
context:
space:
mode:
authorShiva Chen <shiva0217@gmail.com>2018-05-09 02:41:08 +0000
committerShiva Chen <shiva0217@gmail.com>2018-05-09 02:41:08 +0000
commitcd070cdc94ef5f2da3d3a9724c4fcde778fcd163 (patch)
tree314d9c0f1739fa65209925f1bb1cb0832e7fbeb3 /llvm/lib/CodeGen/SelectionDAG/InstrEmitter.h
parent2c864551df3945f50e1780b2f2c880ec358ae715 (diff)
downloadbcm5719-llvm-cd070cdc94ef5f2da3d3a9724c4fcde778fcd163.tar.gz
bcm5719-llvm-cd070cdc94ef5f2da3d3a9724c4fcde778fcd163.zip
[DebugInfo] Convert intrinsic llvm.dbg.label to MachineInstr.
In order to convert LLVM IR to MachineInstr, we need a new TargetOpcode, DBG_LABEL, to ‘lower’ intrinsic llvm.dbg.label. The patch creates this new TargetOpcode and convert intrinsic llvm.dbg.label to MachineInstr through SelectionDAG. In SelectionDAG, debug information is stored in SDDbgInfo. We create a new data member of SDDbgInfo for labels and use the new data member, SDDbgLabel, to create DBG_LABEL MachineInstr. The new DBG_LABEL MachineInstr uses label metadata from LLVM IR as its parameter. So, the backend could get metadata information of labels from DBG_LABEL MachineInstr. Differential Revision: https://reviews.llvm.org/D45341 Patch by Hsiangkai Wang. llvm-svn: 331842
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/InstrEmitter.h')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/InstrEmitter.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.h b/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.h
index 8a8a1bbd18f..701b6368690 100644
--- a/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.h
+++ b/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.h
@@ -113,6 +113,9 @@ public:
MachineInstr *EmitDbgValue(SDDbgValue *SD,
DenseMap<SDValue, unsigned> &VRBaseMap);
+ /// Generate machine instruction for a dbg_label node.
+ MachineInstr *EmitDbgLabel(SDDbgLabel *SD);
+
/// EmitNode - Generate machine code for a node and needed dependencies.
///
void EmitNode(SDNode *Node, bool IsClone, bool IsCloned,
OpenPOWER on IntegriCloud