HomePhabricator

[MIRPrinter] Add machine metadata support.

Authored by hliao on May 25 2021, 5:20 PM.

Description

[MIRPrinter] Add machine metadata support.

  • 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.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D103205

Details

Committed
hliaoJun 19 2021, 9:48 AM
Reviewer
arsenm
Differential Revision
D103205: [MIRPrinter] Add machine metadata support.
Parents
rG940efa4f6981: [amdgpu] Improve the from f32 to i64.
Branches
Unknown
Tags
Unknown