i965/fs: Create a helper function for invalidating live intervals.
For now, this simply sets live_intervals_valid = false, but in the future it will do something more sophisticated. Based on a patch by Eric Anholt. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
parent
45ffaeccaf
commit
4b821a97b5
|
@ -1443,7 +1443,7 @@ fs_visitor::split_virtual_grfs()
|
|||
}
|
||||
}
|
||||
}
|
||||
this->live_intervals_valid = false;
|
||||
invalidate_live_intervals();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1868,7 +1868,7 @@ fs_visitor::dead_code_eliminate()
|
|||
}
|
||||
|
||||
if (progress)
|
||||
live_intervals_valid = false;
|
||||
invalidate_live_intervals();
|
||||
|
||||
return progress;
|
||||
}
|
||||
|
@ -2026,7 +2026,7 @@ fs_visitor::dead_code_eliminate_local()
|
|||
_mesa_hash_table_destroy(ht, NULL);
|
||||
|
||||
if (progress)
|
||||
live_intervals_valid = false;
|
||||
invalidate_live_intervals();
|
||||
|
||||
return progress;
|
||||
}
|
||||
|
@ -2085,9 +2085,8 @@ fs_visitor::register_coalesce_2()
|
|||
inst->remove();
|
||||
|
||||
/* We don't need to recalculate live intervals inside the loop despite
|
||||
* flagging live_intervals_valid because we only use live intervals for
|
||||
* the interferes test, and we must have had a situation where the
|
||||
* intervals were:
|
||||
* invalidating them; we only use them for the interferes test, and we
|
||||
* must have had a situation where the intervals were:
|
||||
*
|
||||
* from to
|
||||
* ^
|
||||
|
@ -2103,7 +2102,7 @@ fs_visitor::register_coalesce_2()
|
|||
* otherwise it will conflict with "to" when we try to coalesce "to"
|
||||
* into Rw anyway.
|
||||
*/
|
||||
live_intervals_valid = false;
|
||||
invalidate_live_intervals();
|
||||
|
||||
progress = true;
|
||||
continue;
|
||||
|
@ -2244,7 +2243,7 @@ fs_visitor::register_coalesce()
|
|||
}
|
||||
|
||||
if (progress)
|
||||
live_intervals_valid = false;
|
||||
invalidate_live_intervals();
|
||||
|
||||
return progress;
|
||||
}
|
||||
|
@ -2407,7 +2406,7 @@ fs_visitor::compute_to_mrf()
|
|||
}
|
||||
|
||||
if (progress)
|
||||
live_intervals_valid = false;
|
||||
invalidate_live_intervals();
|
||||
|
||||
return progress;
|
||||
}
|
||||
|
@ -2478,7 +2477,7 @@ fs_visitor::remove_duplicate_mrf_writes()
|
|||
}
|
||||
|
||||
if (progress)
|
||||
live_intervals_valid = false;
|
||||
invalidate_live_intervals();
|
||||
|
||||
return progress;
|
||||
}
|
||||
|
@ -2745,7 +2744,7 @@ fs_visitor::lower_uniform_pull_constant_loads()
|
|||
inst->opcode = FS_OPCODE_UNIFORM_PULL_CONSTANT_LOAD_GEN7;
|
||||
inst->src[1] = payload;
|
||||
|
||||
this->live_intervals_valid = false;
|
||||
invalidate_live_intervals();
|
||||
} else {
|
||||
/* Before register allocation, we didn't tell the scheduler about the
|
||||
* MRF we use. We know it's safe to use this MRF because nothing
|
||||
|
|
|
@ -290,6 +290,7 @@ public:
|
|||
void compact_virtual_grfs();
|
||||
void move_uniform_array_access_to_pull_constants();
|
||||
void setup_pull_constants();
|
||||
void invalidate_live_intervals();
|
||||
void calculate_live_intervals();
|
||||
bool opt_algebraic();
|
||||
bool opt_cse();
|
||||
|
|
|
@ -562,7 +562,7 @@ fs_visitor::opt_copy_propagate()
|
|||
ralloc_free(mem_ctx);
|
||||
|
||||
if (progress)
|
||||
live_intervals_valid = false;
|
||||
invalidate_live_intervals();
|
||||
|
||||
return progress;
|
||||
}
|
||||
|
|
|
@ -209,7 +209,7 @@ fs_visitor::opt_cse_local(bblock_t *block, exec_list *aeb)
|
|||
ralloc_free(mem_ctx);
|
||||
|
||||
if (progress)
|
||||
this->live_intervals_valid = false;
|
||||
invalidate_live_intervals();
|
||||
|
||||
return progress;
|
||||
}
|
||||
|
|
|
@ -197,6 +197,12 @@ fs_live_variables::~fs_live_variables()
|
|||
|
||||
#define MAX_INSTRUCTION (1 << 30)
|
||||
|
||||
void
|
||||
fs_visitor::invalidate_live_intervals()
|
||||
{
|
||||
this->live_intervals_valid = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Compute the live intervals for each virtual GRF.
|
||||
*
|
||||
|
|
|
@ -658,5 +658,5 @@ fs_visitor::spill_reg(int spill_reg)
|
|||
}
|
||||
}
|
||||
|
||||
this->live_intervals_valid = false;
|
||||
invalidate_live_intervals();
|
||||
}
|
||||
|
|
|
@ -1138,7 +1138,7 @@ fs_visitor::schedule_instructions(bool post_reg_alloc)
|
|||
dispatch_width, sched.time);
|
||||
}
|
||||
|
||||
this->live_intervals_valid = false;
|
||||
invalidate_live_intervals();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in New Issue