mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-07 23:50:11 +01:00
intel/brw: Pull bank_conflicts out of fs_visitor
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26887>
This commit is contained in:
parent
13c312431c
commit
10489b418c
3 changed files with 10 additions and 10 deletions
|
|
@ -6271,7 +6271,7 @@ fs_visitor::allocate_registers(bool allow_spilling)
|
|||
if (failed)
|
||||
return;
|
||||
|
||||
opt_bank_conflicts();
|
||||
brw_fs_opt_bank_conflicts(*this);
|
||||
|
||||
schedule_instructions_post_ra();
|
||||
|
||||
|
|
|
|||
|
|
@ -270,7 +270,6 @@ public:
|
|||
bool opt_algebraic();
|
||||
bool opt_redundant_halt();
|
||||
|
||||
bool opt_bank_conflicts();
|
||||
bool opt_split_sends();
|
||||
bool register_coalesce();
|
||||
bool eliminate_find_live_channel();
|
||||
|
|
@ -619,6 +618,7 @@ bool brw_lower_dpas(fs_visitor &v);
|
|||
|
||||
void nir_to_brw(fs_visitor *s);
|
||||
|
||||
bool brw_fs_opt_bank_conflicts(fs_visitor &s);
|
||||
bool brw_fs_opt_cmod_propagation(fs_visitor &s);
|
||||
bool brw_fs_opt_combine_constants(fs_visitor &s);
|
||||
bool brw_fs_opt_copy_propagation(fs_visitor &s);
|
||||
|
|
|
|||
|
|
@ -907,27 +907,27 @@ namespace {
|
|||
}
|
||||
|
||||
bool
|
||||
fs_visitor::opt_bank_conflicts()
|
||||
brw_fs_opt_bank_conflicts(fs_visitor &s)
|
||||
{
|
||||
assert(grf_used || !"Must be called after register allocation");
|
||||
assert(s.grf_used || !"Must be called after register allocation");
|
||||
|
||||
/* TODO: Re-work this pass for Gfx20+. */
|
||||
if (devinfo->ver >= 20)
|
||||
if (s.devinfo->ver >= 20)
|
||||
return false;
|
||||
|
||||
/* No ternary instructions -- No bank conflicts. */
|
||||
if (devinfo->ver < 6)
|
||||
if (s.devinfo->ver < 6)
|
||||
return false;
|
||||
|
||||
const partitioning p = shader_reg_partitioning(this);
|
||||
const bool *constrained = shader_reg_constraints(this, p);
|
||||
const partitioning p = shader_reg_partitioning(&s);
|
||||
const bool *constrained = shader_reg_constraints(&s, p);
|
||||
const weight_vector_type *conflicts =
|
||||
shader_conflict_weight_matrix(this, p);
|
||||
shader_conflict_weight_matrix(&s, p);
|
||||
const permutation map =
|
||||
optimize_reg_permutation(p, constrained, conflicts,
|
||||
identity_reg_permutation(p));
|
||||
|
||||
foreach_block_and_inst(block, fs_inst, inst, cfg) {
|
||||
foreach_block_and_inst(block, fs_inst, inst, s.cfg) {
|
||||
inst->dst = transform(p, map, inst->dst);
|
||||
|
||||
for (int i = 0; i < inst->sources; i++)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue