intel/fs/bank_conflicts: Don't touch Gen7 MRF hack registers.
Fixes: af2c320190
"intel/fs: Implement GRF bank conflict mitigation pass."
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104199
Reported-by: Darius Spitznagel <d.spitznagel@goodbytez.de>
Reviewed-by: Matt Turner <mattst88@gmail.com>
This commit is contained in:
@@ -945,7 +945,7 @@ fs_inst::flags_written() const
|
||||
* instruction -- the FS opcodes often generate MOVs in addition.
|
||||
*/
|
||||
int
|
||||
fs_visitor::implied_mrf_writes(fs_inst *inst)
|
||||
fs_visitor::implied_mrf_writes(fs_inst *inst) const
|
||||
{
|
||||
if (inst->mlen == 0)
|
||||
return 0;
|
||||
|
@@ -277,7 +277,7 @@ public:
|
||||
|
||||
struct brw_reg interp_reg(int location, int channel);
|
||||
|
||||
int implied_mrf_writes(fs_inst *inst);
|
||||
int implied_mrf_writes(fs_inst *inst) const;
|
||||
|
||||
virtual void dump_instructions();
|
||||
virtual void dump_instructions(const char *name);
|
||||
|
@@ -530,12 +530,12 @@ namespace {
|
||||
for (unsigned reg = 0; reg < 2; reg++)
|
||||
constrained[p.atom_of_reg(reg)] = true;
|
||||
|
||||
/* Assume that anything referenced via fixed GRFs is baked into the
|
||||
* hardware's fixed-function logic and may be unsafe to move around.
|
||||
* Also take into account the source GRF restrictions of EOT
|
||||
* send-message instructions.
|
||||
*/
|
||||
foreach_block_and_inst(block, fs_inst, inst, v->cfg) {
|
||||
/* Assume that anything referenced via fixed GRFs is baked into the
|
||||
* hardware's fixed-function logic and may be unsafe to move around.
|
||||
* Also take into account the source GRF restrictions of EOT
|
||||
* send-message instructions.
|
||||
*/
|
||||
if (inst->dst.file == FIXED_GRF)
|
||||
constrained[p.atom_of_reg(reg_of(inst->dst))] = true;
|
||||
|
||||
@@ -544,6 +544,18 @@ namespace {
|
||||
(is_grf(inst->src[i]) && inst->eot))
|
||||
constrained[p.atom_of_reg(reg_of(inst->src[i]))] = true;
|
||||
}
|
||||
|
||||
/* The location of the Gen7 MRF hack registers is hard-coded in the
|
||||
* rest of the compiler back-end. Don't attempt to move them around.
|
||||
*/
|
||||
if (v->devinfo->gen >= 7) {
|
||||
assert(inst->dst.file != MRF);
|
||||
|
||||
for (int i = 0; i < v->implied_mrf_writes(inst); i++) {
|
||||
const unsigned reg = GEN7_MRF_HACK_START + inst->base_mrf + i;
|
||||
constrained[p.atom_of_reg(reg)] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return constrained;
|
||||
|
Reference in New Issue
Block a user