[Mesa-dev] [PATCH 03/15] i965/cfg: Rework to make IF & ELSE blocks flow into ENDIF.

Chris Forbes chrisf at ijw.co.nz
Mon Dec 2 14:15:29 PST 2013


Neat -- I was about to mention the dead_control_flow_eliminate
interaction, but you beat me to it.

On Tue, Dec 3, 2013 at 10:43 AM, Matt Turner <mattst88 at gmail.com> wrote:
> And since this change makes ENDIF start blocks, I'll squash this
> change in as well to make sure dead_control_flow_eliminate continues
> working:
>
> diff --git a/src/mesa/drivers/dri/i965/brw_dead_control_flow.cpp
> b/src/mesa/drivers/dri/i965/brw_dead_control_flow.cpp
> index ad8ed82..63a3e5b 100644
> --- a/src/mesa/drivers/dri/i965/brw_dead_control_flow.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_dead_control_flow.cpp
> @@ -45,10 +45,10 @@ dead_control_flow_eliminate(backend_visitor *v)
>        bblock_t *block = cfg.blocks[b];
>        bool found = false;
>
> -      /* ENDIF instructions, by definition, can only be found at the ends of
> +      /* ENDIF instructions, by definition, can only be found at the start of
>         * basic blocks.
>         */
> -      backend_instruction *endif_inst = block->end;
> +      backend_instruction *endif_inst = block->start;
>        if (endif_inst->opcode != BRW_OPCODE_ENDIF)
>           continue;
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list