[Mesa-dev] [PATCH 3/5] i965/fs: Track liveness of the flag register.

Matt Turner mattst88 at gmail.com
Wed Oct 29 15:58:13 PDT 2014


On Wed, Oct 29, 2014 at 2:10 PM, Matt Turner <mattst88 at gmail.com> wrote:
> ---
>  .../drivers/dri/i965/brw_fs_live_variables.cpp     | 35 ++++++++++++++++++++++
>  src/mesa/drivers/dri/i965/brw_fs_live_variables.h  |  5 ++++
>  2 files changed, 40 insertions(+)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_fs_live_variables.cpp b/src/mesa/drivers/dri/i965/brw_fs_live_variables.cpp
> index ab81e94..dbe1d34 100644
> --- a/src/mesa/drivers/dri/i965/brw_fs_live_variables.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_fs_live_variables.cpp
> @@ -157,6 +157,18 @@ fs_live_variables::setup_def_use()
>                 reg.reg_offset++;
>              }
>          }
> +         if (inst->reads_flag()) {
> +            /* The vertical combination predicates read f0.0 and f0.1. */
> +            if (inst->predicate == BRW_PREDICATE_ALIGN1_ANYV ||
> +                inst->predicate == BRW_PREDICATE_ALIGN1_ALLV) {
> +               if (!BITSET_TEST(bd->flag_def, 1 - inst->flag_subreg)) {
> +                  BITSET_SET(bd->flag_use, 1 - inst->flag_subreg);

Since don't expect (+f0.1.allv) to work (i.e., vertical predicates
with a subregister of 1), maybe I should just assert(inst->flag_subreg
== 0) and then do BITSET_*(..., 1) here.


More information about the mesa-dev mailing list