[Assignment Tracking][3/*] Add DIAssignID metadata boilerplate
authorOCHyams <orlando.hyams@sony.com>
Thu, 3 Nov 2022 09:50:31 +0000 (09:50 +0000)
committerOCHyams <orlando.hyams@sony.com>
Thu, 3 Nov 2022 11:24:18 +0000 (11:24 +0000)
commite53c4c6d8617145c4dd8d428bf47544ba4110eb5
treeed85013b0b05ed46d112b56c65807d3a5ec01d68
parent5144133f6fd50d6067c808b83af90437995e441d
[Assignment Tracking][3/*] Add DIAssignID metadata boilerplate

The Assignment Tracking debug-info feature is outlined in this RFC:

https://discourse.llvm.org/t/
rfc-assignment-tracking-a-better-way-of-specifying-variable-locations-in-ir

Add the DIAssignID metadata attachment boilerplate. Includes a textual-bitcode
roundtrip test and tests that the verifier and parser catch badly formed IR.

This piece of metadata links together stores (used as an attachment) and the
yet-to-be-added llvm.dbg.assign debug intrinsic (used as an operand).

Reviewed By: jmorse

Differential Revision: https://reviews.llvm.org/D132222
16 files changed:
llvm/include/llvm-c/DebugInfo.h
llvm/include/llvm/Bitcode/LLVMBitCodes.h
llvm/include/llvm/IR/DebugInfoMetadata.h
llvm/include/llvm/IR/FixedMetadataKinds.def
llvm/include/llvm/IR/Metadata.def
llvm/lib/AsmParser/LLParser.cpp
llvm/lib/Bitcode/Reader/MetadataLoader.cpp
llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
llvm/lib/IR/AsmWriter.cpp
llvm/lib/IR/DebugInfo.cpp
llvm/lib/IR/DebugInfoMetadata.cpp
llvm/lib/IR/Verifier.cpp
llvm/test/DebugInfo/Generic/assignment-tracking/parse-and-verify/distinct.ll [new file with mode: 0644]
llvm/test/DebugInfo/Generic/assignment-tracking/parse-and-verify/instruction-type.ll [new file with mode: 0644]
llvm/test/DebugInfo/Generic/assignment-tracking/parse-and-verify/operands.ll [new file with mode: 0644]
llvm/test/DebugInfo/Generic/assignment-tracking/parse-and-verify/roundtrip.ll [new file with mode: 0644]