[PATCH] D117504: AMDGPU: Convert AMDGPUResourceUsageAnalysis to a Module pass
Sebastian Neubauer via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 21 08:54:33 PST 2022
sebastian-ne added a comment.
I think I found the problem and I’m a little surprised it currently works.
In the llpc pipeline, a module pass (`PipelineStateClearer`) writes pal metadata into the `amdgpu.pal.metadata.msgpack` metadata.
This metadata is read by the `AMDGPUAsmPrinter`, extended as functions are emitted and finally written out in `AMDGPUTarget[…]Streamer::finish`.
The reading of the metadata happens in `AMDGPUAsmPrinter::emitStartOfAsmFile`, which is called from `AsmPrinter::doInitialization`, which in turn is called when the pass manager is initialized.
So, the metadata is read at pass manager initialization, but it’s only written afterwards when running a pass, resulting in missing metadata in the output.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D117504/new/
https://reviews.llvm.org/D117504
More information about the llvm-commits
mailing list