nir/range_analysis: cache results of non-alu fp class queries
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

The dense array should be much faster than the previous hash table.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40346>
This commit is contained in:
Rhys Perry 2026-03-12 15:08:31 +00:00 committed by Marge Bot
parent 84eeecf822
commit 3c67225afa

View file

@ -188,12 +188,7 @@ push_fp_query(struct analysis_state *state, const nir_def *def)
static uint32_t
get_fp_key(struct analysis_query *q)
{
struct fp_query *fp_q = (struct fp_query *)q;
if (!nir_def_is_alu(fp_q->def))
return UINT32_MAX;
return fp_q->def->index;
return ((struct fp_query *)q)->def->index;
}
static bool