[PATCH] D103205: [MIRPrinter] Add machine metadata support.

Michael Liao via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 27 13:55:12 PDT 2021


hliao marked 3 inline comments as done.
hliao added a comment.

the patch is revised following comments.



================
Comment at: llvm/include/llvm/CodeGen/MIRYamlMapping.h:707
   MachineJumpTable JumpTableInfo;
+  std::vector<StringValue> MachineMetadataNodes;
   BlockStringValue Body;
----------------
arsenm wrote:
> Is this just for the metadata nodes attached to the function itself?
yes, as 'printMIR' inherently works per function wise, the metadata here refers to ones attached to the specified MF. So far, metadata generated in the backend are all unnamed ones and only referenced within that function only.
Furthermore, our MIR/MF in some tools may be removed in a function-pass ('createFreeMachineFunctionPass'). That makes the whole machine module inconsistent between prints of different MFs.



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D103205/new/

https://reviews.llvm.org/D103205



More information about the llvm-commits mailing list