broadcom/compiler: drop spill_count and add spilling boolean
We added spill_count to handle uniform batch spills, which we no longer do. What we want now is a way to know if we are spilling registers. Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15041>
This commit is contained in:

committed by
Marge Bot

parent
f3c3228522
commit
8883975209
@@ -4507,7 +4507,6 @@ v3d_nir_to_vir(struct v3d_compile *c)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
c->spill_count = 0;
|
|
||||||
c->spills = 0;
|
c->spills = 0;
|
||||||
c->fills = 0;
|
c->fills = 0;
|
||||||
c->threads /= 2;
|
c->threads /= 2;
|
||||||
|
@@ -789,6 +789,12 @@ struct v3d_compile {
|
|||||||
uint32_t spill_size;
|
uint32_t spill_size;
|
||||||
/* Shader-db stats */
|
/* Shader-db stats */
|
||||||
uint32_t spills, fills, loops;
|
uint32_t spills, fills, loops;
|
||||||
|
|
||||||
|
/* Whether we are in the process of spilling registers for
|
||||||
|
* register allocation
|
||||||
|
*/
|
||||||
|
bool spilling;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Register spilling's per-thread base address, shared between each
|
* Register spilling's per-thread base address, shared between each
|
||||||
* spill/fill's addressing calculations.
|
* spill/fill's addressing calculations.
|
||||||
@@ -881,9 +887,6 @@ struct v3d_compile {
|
|||||||
bool emitted_tlb_load;
|
bool emitted_tlb_load;
|
||||||
bool lock_scoreboard_on_first_thrsw;
|
bool lock_scoreboard_on_first_thrsw;
|
||||||
|
|
||||||
/* Total number of spilled registers in the program */
|
|
||||||
uint32_t spill_count;
|
|
||||||
|
|
||||||
enum v3d_compilation_result compilation_result;
|
enum v3d_compilation_result compilation_result;
|
||||||
|
|
||||||
bool tmu_dirty_rcl;
|
bool tmu_dirty_rcl;
|
||||||
|
@@ -278,7 +278,7 @@ v3d_setup_spill_base(struct v3d_compile *c)
|
|||||||
* accumulator because it is used for TMU spill/fill and thus
|
* accumulator because it is used for TMU spill/fill and thus
|
||||||
* needs to persist across thread switches.
|
* needs to persist across thread switches.
|
||||||
*/
|
*/
|
||||||
if (c->spill_count > 0) {
|
if (c->spilling) {
|
||||||
int temp_class = CLASS_BITS_PHYS;
|
int temp_class = CLASS_BITS_PHYS;
|
||||||
if (i != c->spill_base.index)
|
if (i != c->spill_base.index)
|
||||||
temp_class |= CLASS_BITS_ACC;
|
temp_class |= CLASS_BITS_ACC;
|
||||||
@@ -415,8 +415,7 @@ static void
|
|||||||
v3d_spill_reg(struct v3d_compile *c, int *acc_nodes, int spill_temp)
|
v3d_spill_reg(struct v3d_compile *c, int *acc_nodes, int spill_temp)
|
||||||
{
|
{
|
||||||
int start_num_temps = c->num_temps;
|
int start_num_temps = c->num_temps;
|
||||||
|
c->spilling = true;
|
||||||
c->spill_count++;
|
|
||||||
|
|
||||||
bool is_uniform = vir_is_mov_uniform(c, spill_temp);
|
bool is_uniform = vir_is_mov_uniform(c, spill_temp);
|
||||||
|
|
||||||
@@ -615,6 +614,7 @@ v3d_spill_reg(struct v3d_compile *c, int *acc_nodes, int spill_temp)
|
|||||||
}
|
}
|
||||||
|
|
||||||
c->disable_ldunif_opt = had_disable_ldunif_opt;
|
c->disable_ldunif_opt = had_disable_ldunif_opt;
|
||||||
|
c->spilling = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct v3d_ra_select_callback_data {
|
struct v3d_ra_select_callback_data {
|
||||||
|
Reference in New Issue
Block a user