nir: track whether a loop contains soft fp64 ops

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18863>
This commit is contained in:
SoroushIMG 2022-09-29 14:59:06 +01:00 committed by Marge Bot
parent bcbcc25602
commit 121f30005f
2 changed files with 6 additions and 1 deletions

View file

@ -2871,6 +2871,9 @@ typedef struct {
/* Estimated cost (in number of instructions) of the loop */
unsigned instr_cost;
/* Contains fp64 ops that will be lowered */
bool has_soft_fp64;
/* Guessed trip count based on array indexing */
unsigned guessed_trip_count;

View file

@ -216,8 +216,10 @@ instr_cost(loop_info_state *state, nir_instr *instr,
cost *= 20;
/* If it's full software, it's even more expensive */
if (options->lower_doubles_options & nir_lower_fp64_full_software)
if (options->lower_doubles_options & nir_lower_fp64_full_software) {
cost *= 100;
state->loop->info->has_soft_fp64 = true;
}
return cost;
} else {