summaryrefslogtreecommitdiff
path: root/src/amd/compiler/aco_print_ir.cpp
diff options
context:
space:
mode:
authorRhys Perry <pendingchaos02@gmail.com>2021-02-03 13:40:54 +0000
committerRhys Perry <pendingchaos02@gmail.com>2021-03-11 16:31:19 +0000
commita0243f5c4722959ae94f46f7e086bf466534f7c7 (patch)
tree08ec3dd07bd709c6bbb94825fc3dc7af993c4fa3 /src/amd/compiler/aco_print_ir.cpp
parent5d6a1095bfe1774d0b81819a75b8b7e672f9b1f7 (diff)
downloadmesa-a0243f5c4722959ae94f46f7e086bf466534f7c7.tar.gz
aco: add ACO_DEBUG=perfinfo
This prints the program with each instruction's contribution to it's latency and various factors for the calculation of the Inverse Throughput statistic. Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8994>
Diffstat (limited to 'src/amd/compiler/aco_print_ir.cpp')
-rw-r--r--src/amd/compiler/aco_print_ir.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/amd/compiler/aco_print_ir.cpp b/src/amd/compiler/aco_print_ir.cpp
index 9da3eb610c6..3fc70540d46 100644
--- a/src/amd/compiler/aco_print_ir.cpp
+++ b/src/amd/compiler/aco_print_ir.cpp
@@ -875,6 +875,9 @@ void aco_print_block(const Block* block, FILE *output, unsigned flags)
fprintf(output, "*/\n");
for (auto const& instr : block->instructions) {
fprintf(output, "\t");
+ if (flags & print_perf_info)
+ fprintf(output, "(%3u clk) ", instr->pass_flags);
+
aco_print_instr(instr.get(), output, flags);
fprintf(output, "\n");
}