[all-commits] [llvm/llvm-project] 4a0256: [AMDGPU] Lazily init pal metadata on first function

Sebastian Neubauer via All-commits all-commits at lists.llvm.org
Fri Feb 4 09:41:34 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4a02562275d460a4a2970ca3938cbca710c39268
      https://github.com/llvm/llvm-project/commit/4a02562275d460a4a2970ca3938cbca710c39268
  Author: Sebastian Neubauer <Sebastian.Neubauer at amd.com>
  Date:   2022-02-04 (Fri, 04 Feb 2022)

  Changed paths:
    M llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
    M llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.h
    A llvm/unittests/CodeGen/AMDGPUMetadataTest.cpp
    M llvm/unittests/CodeGen/CMakeLists.txt

  Log Message:
  -----------
  [AMDGPU] Lazily init pal metadata on first function

Delay reading global metadata until the first function or the end of
the file is emitted. That way, earlier module passes can set metadata
that is emitted in the ELF.

`emitStartOfAsmFile` gets called when the passes are initialized,
which prevented earlier passes from changing the metadata.

This fixes issues encountered after converting
AMDGPUResourceUsageAnalysis to a Module pass in D117504.

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




More information about the All-commits mailing list