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:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user