[all-commits] [llvm/llvm-project] b9c05a: [MIRPrinter] Add machine metadata support.

darkbuck via All-commits all-commits at lists.llvm.org
Sat Jun 19 09:48:29 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b9c05aff205bab3f8ca639e44b825277d6cf48a9
      https://github.com/llvm/llvm-project/commit/b9c05aff205bab3f8ca639e44b825277d6cf48a9
  Author: Michael Liao <michael.hliao at gmail.com>
  Date:   2021-06-19 (Sat, 19 Jun 2021)

  Changed paths:
    M llvm/include/llvm/CodeGen/MIRYamlMapping.h
    A llvm/include/llvm/CodeGen/MachineModuleSlotTracker.h
    M llvm/include/llvm/IR/ModuleSlotTracker.h
    M llvm/lib/CodeGen/CMakeLists.txt
    M llvm/lib/CodeGen/MIRPrinter.cpp
    A llvm/lib/CodeGen/MachineModuleSlotTracker.cpp
    M llvm/lib/IR/AsmWriter.cpp
    M llvm/unittests/CMakeLists.txt
    M llvm/unittests/CodeGen/CMakeLists.txt
    A llvm/unittests/MIR/CMakeLists.txt
    A llvm/unittests/MIR/MachineMetadata.cpp

  Log Message:
  -----------
  [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




More information about the All-commits mailing list