[PATCH] D130883: [MachineInstrBuilder] Introduce MIMetadata to simplify metadata propagation

Marco Elver via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 1 01:58:15 PDT 2022


melver created this revision.
Herald added a project: All.
melver requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

In many places DebugLoc and PCSections metadata are just copied along to
propagate them through MachineInstrs. Simplify doing so by bundling them
up in a MIMetadata class that replaces the DebugLoc argument to most
BuildMI() variants.

The DebugLoc-only constructors allow implicit construction, so that
existing usage of `BuildMI(.., DL, ..)` works as before, and the rest of
the codebase using BuildMI() does not require changes.

NFC.

Depends on D130882 <https://reviews.llvm.org/D130882>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D130883

Files:
  llvm/include/llvm/CodeGen/MachineInstrBuilder.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D130883.448952.patch
Type: text/x-patch
Size: 9218 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220801/eb122903/attachment.bin>


More information about the llvm-commits mailing list