last_accumulator_write = NULL;
last_fixed_grf_write = NULL;
- exec_node *node;
- exec_node *prev;
- for (node = instructions.get_tail(), prev = node->prev;
- !node->is_head_sentinel();
- node = prev, prev = node->prev) {
- schedule_node *n = (schedule_node *)node;
+ foreach_in_list_reverse_safe(schedule_node, n, &instructions) {
fs_inst *inst = (fs_inst *)n->inst;
/* write-after-read deps. */
last_accumulator_write = NULL;
last_fixed_grf_write = NULL;
- exec_node *node;
- exec_node *prev;
- for (node = instructions.get_tail(), prev = node->prev;
- !node->is_head_sentinel();
- node = prev, prev = node->prev) {
- schedule_node *n = (schedule_node *)node;
+ foreach_in_list_reverse_safe(schedule_node, n, &instructions) {
vec4_instruction *inst = (vec4_instruction *)n->inst;
/* write-after-read deps. */