[Mesa-dev] [PATCH 5/6] i965/fs: Give up in interference check if we see a WHILE.

Kenneth Graunke kenneth at whitecape.org
Thu Apr 17 22:11:01 PDT 2014


On 04/16/2014 11:07 AM, Matt Turner wrote:
> Rather than any old control flow. Muchnick's algorithm just checks for
> interfering writes between the MOV and the end of the program. Handling
> this when you have backward branches is hard, so don't, but there's no
> reason to bail if you see forward branches.
> 
> instructions in affected programs:     4270 -> 4248 (-0.52%)
> ---
>  src/mesa/drivers/dri/i965/brw_fs_register_coalesce.cpp | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/mesa/drivers/dri/i965/brw_fs_register_coalesce.cpp b/src/mesa/drivers/dri/i965/brw_fs_register_coalesce.cpp
> index 58f6ca7..ca7a6a8 100644
> --- a/src/mesa/drivers/dri/i965/brw_fs_register_coalesce.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_fs_register_coalesce.cpp
> @@ -98,7 +98,7 @@ can_coalesce_vars(brw::fs_live_variables *live_intervals,
>     for (scan_inst = (fs_inst *)inst->next;
>          scan_inst->next != NULL && ip <= live_intervals->end[var_to];
>          scan_inst = (fs_inst *)scan_inst->next, ip++) {
> -      if (scan_inst->is_control_flow())
> +      if (scan_inst->opcode == BRW_OPCODE_WHILE)
>           return false;
>  
>        if (scan_inst->dst.equals(inst->dst) ||
> 

Patches 5-6 are:
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

I also tested L4D2 (or, at least an apitrace of it), and it continues to
work fine.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140417/a9a16d35/attachment.sig>


More information about the mesa-dev mailing list