[PATCH] D103205: [MIRPrinter] Add machine metadata support.
Michael Liao via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 26 13:44:12 PDT 2021
hliao created this revision.
hliao added reviewers: nikic, jeroen.dobbelaere.
Herald added subscribers: dexonsmith, mgrang, hiraditya, mgorny.
hliao requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
- Distinct metadata needs generating in the codegen to attach correct AAInfo on the loads/stores after lowering, merging, and other relevant transformations.
- This patch adds 'MachhineModuleSlotTracker' to help assign slot numbers to these newly generated unnamed metadata nodes.
- To help 'MachhineModuleSlotTracker' track machine metadata, the original 'SlotTracker' is rebased from 'AbstractSlotTrackerStorage', which provides basic interfaces to create/retrive metadata slots. In addition, once LLVM IR is processsed, additional hooks are also introduced to help collect machine metadata and assign them slot numbers.
- Finally, if there is any such machine metadata, 'MIRPrinter' outputs an additional 'machineMetadataNodes' field containing all the definition of those nodes.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D103205
Files:
llvm/include/llvm/CodeGen/MIRYamlMapping.h
llvm/include/llvm/CodeGen/MachineModuleSlotTracker.h
llvm/include/llvm/IR/ModuleSlotTracker.h
llvm/lib/CodeGen/CMakeLists.txt
llvm/lib/CodeGen/MIRPrinter.cpp
llvm/lib/CodeGen/MachineModuleSlotTracker.cpp
llvm/lib/IR/AsmWriter.cpp
llvm/unittests/CodeGen/CMakeLists.txt
llvm/unittests/CodeGen/MachineMetadata.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D103205.348079.patch
Type: text/x-patch
Size: 33965 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210526/9b4b12dc/attachment.bin>
More information about the llvm-commits
mailing list