[PATCH] D45341: [DebugInfo] Convert intrinsic llvm.dbg.label to MachineInstr.

Hsiangkai Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 5 17:10:40 PDT 2018


HsiangKai created this revision.
HsiangKai added reviewers: rnk, chenwj, aprantl, probinson.
Herald added subscribers: JDevlieghere, MatzeB.

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.


Repository:
  rL LLVM

https://reviews.llvm.org/D45341

Files:
  include/llvm/CodeGen/MachineInstr.h
  include/llvm/CodeGen/SelectionDAG.h
  include/llvm/Support/TargetOpcodes.def
  include/llvm/Target/Target.td
  lib/CodeGen/AsmPrinter/AsmPrinter.cpp
  lib/CodeGen/MachineInstr.cpp
  lib/CodeGen/PatchableFunction.cpp
  lib/CodeGen/SelectionDAG/InstrEmitter.cpp
  lib/CodeGen/SelectionDAG/InstrEmitter.h
  lib/CodeGen/SelectionDAG/SDNodeDbgValue.h
  lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp
  lib/CodeGen/SelectionDAG/SelectionDAG.cpp
  lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
  test/DebugInfo/Generic/debug-label-mi.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45341.141241.patch
Type: text/x-patch
Size: 18690 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180406/80f28416/attachment.bin>


More information about the llvm-commits mailing list