mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-09 21:20:14 +01:00
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:
parent
bcbcc25602
commit
121f30005f
2 changed files with 6 additions and 1 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue