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

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 27 18:18:15 PDT 2021


arsenm added inline comments.


================
Comment at: llvm/include/llvm/CodeGen/MIRYamlMapping.h:707
   MachineJumpTable JumpTableInfo;
+  std::vector<StringValue> MachineMetadataNodes;
   BlockStringValue Body;
----------------
hliao wrote:
> 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.
> 
So the intent is you do not need the IR section to use the metadata? I had assumed this would directly read from the IR. I'm all for breaking the IR dependency but wondering what happens if the IR section metadata is inconsistent with the MIR section metadata


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