intel: Add statistic for Non SSA registers after NIR to BRW

This is going to be useful while we convert the NIR to BRW to produce
SSA definitions.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30496>
This commit is contained in:
Caio Oliveira
2024-08-16 21:29:48 -07:00
committed by Marge Bot
parent 6db7d1af16
commit 2811cb2923
6 changed files with 28 additions and 2 deletions
+10 -2
View File
@@ -193,8 +193,8 @@ def_analysis::validate(const fs_visitor *v) const
return true;
}
void
def_analysis::print_stats(const fs_visitor *v) const
unsigned
def_analysis::ssa_count() const
{
unsigned defs = 0;
@@ -203,6 +203,14 @@ def_analysis::print_stats(const fs_visitor *v) const
++defs;
}
return defs;
}
void
def_analysis::print_stats(const fs_visitor *v) const
{
const unsigned defs = ssa_count();
fprintf(stderr, "DEFS: %u registers, %u SSA, %u non-SSA => %.1f SSA\n",
def_count, defs, def_count - defs,
100.0f * float(defs) / float(def_count));