[PATCH] D123878: [AMDGPU] Add remarks to output some resource usage
Vang Thao via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 21 17:40:52 PDT 2022
vangthao added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp:596
+ MF.getFunction().getSubprogram(), &MF.front())
+ << "------------------------------";
+ });
----------------
scott.linder wrote:
> This seems like the wrong place to segment the output; could this be made a part of the emitter itself?
>
> Or maybe better yet, could all of these values be collected into a single remark? That seems to be how e.g. `llvm/lib/CodeGen/RegAllocGreedy.cpp` does it:
>
> ```
> Pass: regalloc Name: SpillReloadCopies Function: f Args: - NumSpills: '1' - String: ' spills ' - TotalSpillsCost: '1.000000e+00' - String: ' total spills cost ' - NumReloads: '1' - String: ' reloads ' - TotalReloadsCost: '1.000000e+00' - String: ' total reloads cost ' - String: generated in function
> ```
We also want to output this in a readable format for the frontend. Collecting it all into a single remark seems to break the output format since clang seems to ignore all newlines from a diagnostic remark.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D123878/new/
https://reviews.llvm.org/D123878
More information about the cfe-commits
mailing list