[Mesa-dev] [PATCH 02/10] i965: Use foreach_in_list_reverse_safe() macro.

Ian Romanick idr at freedesktop.org
Tue Mar 8 01:27:04 UTC 2016


I don't really have any basis to comment on the rest of the series, but
this patch is

Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>

On 03/04/2016 08:04 PM, Matt Turner wrote:
> ---
>  src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp | 14 ++------------
>  1 file changed, 2 insertions(+), 12 deletions(-)
> 
> diff --git a/src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp b/src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp
> index 2c7e4f7..51d9ce1 100644
> --- a/src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp
> @@ -1057,12 +1057,7 @@ fs_instruction_scheduler::calculate_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) {
>        fs_inst *inst = (fs_inst *)n->inst;
>  
>        /* write-after-read deps. */
> @@ -1284,12 +1279,7 @@ vec4_instruction_scheduler::calculate_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. */
> 



More information about the mesa-dev mailing list