[all-commits] [llvm/llvm-project] 2c5f3d: [DebugInstrRef] Parse debug instruction-references...

Jeremy Morse via All-commits all-commits at lists.llvm.org
Wed Oct 14 02:58:21 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 2c5f3d54c5ee4efdf63736c23a3a7b448a308996
      https://github.com/llvm/llvm-project/commit/2c5f3d54c5ee4efdf63736c23a3a7b448a308996
  Author: Jeremy Morse <jeremy.morse at sony.com>
  Date:   2020-10-14 (Wed, 14 Oct 2020)

  Changed paths:
    M llvm/include/llvm/CodeGen/MachineFunction.h
    M llvm/include/llvm/CodeGen/MachineInstr.h
    M llvm/lib/CodeGen/MIRParser/MILexer.cpp
    M llvm/lib/CodeGen/MIRParser/MILexer.h
    M llvm/lib/CodeGen/MIRParser/MIParser.cpp
    M llvm/lib/CodeGen/MIRParser/MIRParser.cpp
    M llvm/lib/CodeGen/MIRPrinter.cpp
    M llvm/lib/CodeGen/MachineFunction.cpp
    M llvm/lib/CodeGen/MachineVerifier.cpp
    A llvm/test/DebugInfo/MIR/InstrRef/instr-ref-roundtrip.mir
    A llvm/test/DebugInfo/MIR/InstrRef/no-duplicates.mir
    A llvm/test/DebugInfo/MIR/InstrRef/no-metainstrs.mir

  Log Message:
  -----------
  [DebugInstrRef] Parse debug instruction-references from/to MIR

This patch defines the MIR format for debug instruction references: it's an
integer trailing an instruction, marked out by "debug-instr-number", much
like how "debug-location" identifies the DebugLoc metadata of an
instruction. The instruction number is stored directly in a MachineInstr.

Actually referring to an instruction comes in a later patch, but is done
using one of these instruction numbers.

I've added a round-trip test and two verifier checks: that we don't label
meta-instructions as generating values, and that there are no duplicates.

Differential Revision: https://reviews.llvm.org/D85746




More information about the All-commits mailing list