intel/fs: Replace fs_visitor::bank_conflict_cycles() with stand-alone function.

This will be re-usable by the IR performance analysis pass.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
Francisco Jerez
2020-04-02 16:20:34 -07:00
parent d2ed740795
commit bda1d72dd9
4 changed files with 17 additions and 17 deletions

View File

@@ -1649,10 +1649,12 @@ vec4_instruction_scheduler::choose_instruction_to_schedule()
}
int
fs_instruction_scheduler::issue_time(backend_instruction *inst)
fs_instruction_scheduler::issue_time(backend_instruction *inst0)
{
const unsigned overhead = v->bank_conflict_cycles((fs_inst *)inst);
if (is_compressed((fs_inst *)inst))
const fs_inst *inst = static_cast<fs_inst *>(inst0);
const unsigned overhead = v->grf_used && has_bank_conflict(v->devinfo, inst) ?
DIV_ROUND_UP(inst->dst.component_size(inst->exec_size), REG_SIZE) : 0;
if (is_compressed(inst))
return 4 + overhead;
else
return 2 + overhead;