diff options
author | Francisco Jerez <[email protected]> | 2020-04-02 16:20:34 -0700 |
---|---|---|
committer | Francisco Jerez <[email protected]> | 2020-04-28 23:00:29 -0700 |
commit | bda1d72dd999a819b9645f55c2247bf84292bf34 (patch) | |
tree | 97116e64d94832708a2d3504b95d45976933e486 /src/intel/compiler/brw_schedule_instructions.cpp | |
parent | d2ed74079542dac5668ab057802bc8ede3aca618 (diff) |
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 <[email protected]>
Diffstat (limited to 'src/intel/compiler/brw_schedule_instructions.cpp')
-rw-r--r-- | src/intel/compiler/brw_schedule_instructions.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/intel/compiler/brw_schedule_instructions.cpp b/src/intel/compiler/brw_schedule_instructions.cpp index 7c1390b8689..6edafc8bffc 100644 --- a/src/intel/compiler/brw_schedule_instructions.cpp +++ b/src/intel/compiler/brw_schedule_instructions.cpp @@ -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; |