[DebugInstrRef][1/9] Add fields for instr-ref variable locations
authorJeremy Morse <jeremy.morse@sony.com>
Mon, 14 Sep 2020 08:55:38 +0000 (09:55 +0100)
committerJeremy Morse <jeremy.morse@sony.com>
Mon, 14 Sep 2020 09:06:52 +0000 (10:06 +0100)
commitd3af441dfeb69d4c2a91b427e3d7a57e04c59201
treed94aad7fd4715cc2943eaa76d7064b8b6589c2cf
parent119e57be76266bf524a4e3b45e01dd8c2c1e9d35
[DebugInstrRef][1/9] Add fields for instr-ref variable locations

Add a DBG_INSTR_REF instruction and a "debug instruction number" field to
MachineInstr. The two allow variable values to be specified by
identifying where the value is computed, rather than the register it lies
in, like so:

  %0 = fooinst, debug-instr-number 1
  [...]
  DBG_INSTR_REF 1, 0

See the original RFC for motivation:
http://lists.llvm.org/pipermail/llvm-dev/2020-February/139440.html

This patch is NFCI; it only adds fields and other boiler plate.

Differential Revision: https://reviews.llvm.org/D85741
llvm/include/llvm/CodeGen/MachineFunction.h
llvm/include/llvm/CodeGen/MachineInstr.h
llvm/include/llvm/Support/TargetOpcodes.def
llvm/include/llvm/Target/Target.td
llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
llvm/lib/CodeGen/MachineInstr.cpp