mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 03:08:05 +02:00
i965: Remove block arg from foreach_inst_in_block_*_starting_from
Since 49374fab5d these macros no longer actually use the block
argument. I think this is worth doing to make the macros easier to use
because they already have really long names and a confusing set of
arguments.
Reviewed-by: Matt Turner <mattst88@gmail.com>
This commit is contained in:
parent
38ceeeadaa
commit
801f151917
5 changed files with 8 additions and 9 deletions
|
|
@ -327,12 +327,12 @@ struct cfg_t {
|
|||
#define foreach_inst_in_block_reverse_safe(__type, __inst, __block) \
|
||||
foreach_in_list_reverse_safe(__type, __inst, &(__block)->instructions)
|
||||
|
||||
#define foreach_inst_in_block_starting_from(__type, __scan_inst, __inst, __block) \
|
||||
#define foreach_inst_in_block_starting_from(__type, __scan_inst, __inst) \
|
||||
for (__type *__scan_inst = (__type *)__inst->next; \
|
||||
!__scan_inst->is_tail_sentinel(); \
|
||||
__scan_inst = (__type *)__scan_inst->next)
|
||||
|
||||
#define foreach_inst_in_block_reverse_starting_from(__type, __scan_inst, __inst, __block) \
|
||||
#define foreach_inst_in_block_reverse_starting_from(__type, __scan_inst, __inst) \
|
||||
for (__type *__scan_inst = (__type *)__inst->prev; \
|
||||
!__scan_inst->is_head_sentinel(); \
|
||||
__scan_inst = (__type *)__scan_inst->prev)
|
||||
|
|
|
|||
|
|
@ -2456,7 +2456,7 @@ fs_visitor::compute_to_mrf()
|
|||
/* Found a move of a GRF to a MRF. Let's see if we can go
|
||||
* rewrite the thing that made this GRF to write into the MRF.
|
||||
*/
|
||||
foreach_inst_in_block_reverse_starting_from(fs_inst, scan_inst, inst, block) {
|
||||
foreach_inst_in_block_reverse_starting_from(fs_inst, scan_inst, inst) {
|
||||
if (scan_inst->dst.file == GRF &&
|
||||
scan_inst->dst.reg == inst->src[0].reg) {
|
||||
/* Found the last thing to write our reg we want to turn
|
||||
|
|
@ -2789,7 +2789,7 @@ fs_visitor::insert_gen4_pre_send_dependency_workarounds(bblock_t *block,
|
|||
* we assume that there are no outstanding dependencies on entry to the
|
||||
* program.
|
||||
*/
|
||||
foreach_inst_in_block_reverse_starting_from(fs_inst, scan_inst, inst, block) {
|
||||
foreach_inst_in_block_reverse_starting_from(fs_inst, scan_inst, inst) {
|
||||
/* If we hit control flow, assume that there *are* outstanding
|
||||
* dependencies, and force their cleanup before our instruction.
|
||||
*/
|
||||
|
|
@ -2855,7 +2855,7 @@ fs_visitor::insert_gen4_post_send_dependency_workarounds(bblock_t *block, fs_ins
|
|||
/* Walk forwards looking for writes to registers we're writing which aren't
|
||||
* read before being written.
|
||||
*/
|
||||
foreach_inst_in_block_starting_from(fs_inst, scan_inst, inst, block) {
|
||||
foreach_inst_in_block_starting_from(fs_inst, scan_inst, inst) {
|
||||
/* If we hit control flow, force resolve all remaining dependencies. */
|
||||
if (block->end() == scan_inst) {
|
||||
for (int i = 0; i < write_len; i++) {
|
||||
|
|
|
|||
|
|
@ -87,8 +87,7 @@ opt_cmod_propagation_local(bblock_t *block)
|
|||
continue;
|
||||
|
||||
bool read_flag = false;
|
||||
foreach_inst_in_block_reverse_starting_from(fs_inst, scan_inst, inst,
|
||||
block) {
|
||||
foreach_inst_in_block_reverse_starting_from(fs_inst, scan_inst, inst) {
|
||||
if (scan_inst->overwrites_reg(inst->src[0])) {
|
||||
if (scan_inst->is_partial_write() ||
|
||||
scan_inst->dst.reg_offset != inst->src[0].reg_offset)
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ opt_saturate_propagation_local(fs_visitor *v, bblock_t *block)
|
|||
int src_end_ip = v->live_intervals->end[src_var];
|
||||
|
||||
bool interfered = false;
|
||||
foreach_inst_in_block_reverse_starting_from(fs_inst, scan_inst, inst, block) {
|
||||
foreach_inst_in_block_reverse_starting_from(fs_inst, scan_inst, inst) {
|
||||
if (scan_inst->overwrites_reg(inst->src[0])) {
|
||||
if (scan_inst->is_partial_write() ||
|
||||
(scan_inst->dst.type != inst->dst.type &&
|
||||
|
|
|
|||
|
|
@ -1111,7 +1111,7 @@ vec4_visitor::opt_register_coalesce()
|
|||
*/
|
||||
vec4_instruction *_scan_inst = (vec4_instruction *)inst->prev;
|
||||
foreach_inst_in_block_reverse_starting_from(vec4_instruction, scan_inst,
|
||||
inst, block) {
|
||||
inst) {
|
||||
_scan_inst = scan_inst;
|
||||
|
||||
if (inst->src[0].in_range(scan_inst->dst, scan_inst->regs_written)) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue