[PATCH] D118492: [AMDGPU] Lazily init pal metadata on first function
Sebastian Neubauer via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 28 10:03:51 PST 2022
sebastian-ne created this revision.
sebastian-ne added reviewers: arsenm, tpr.
Herald added subscribers: foad, kerbowa, hiraditya, t-tye, dstuttard, yaxunl, mgorny, nhaehnle, jvesely, kzhuravl.
sebastian-ne requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.
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 <https://reviews.llvm.org/D117504>.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D118492
Files:
llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.h
llvm/unittests/CodeGen/AMDGPUMetadataTest.cpp
llvm/unittests/CodeGen/CMakeLists.txt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D118492.404071.patch
Type: text/x-patch
Size: 5463 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220128/27b2b060/attachment.bin>
More information about the llvm-commits
mailing list