[Mesa-dev] [PATCH 1/7] glsl: Separate overlapping sentinel nodes in exec_list.

Matt Turner mattst88 at gmail.com
Mon Jul 11 19:19:13 UTC 2016


On Fri, Jul 8, 2016 at 3:18 PM, Matt Turner <mattst88 at gmail.com> wrote:
> I do appreciate the cleverness, but unfortunately it prevents a lot more
> cleverness in the form of additional compiler optimizations brought on
> by -fstrict-aliasing.
>
> No difference in OglBatch7 (n=20).
>
> Co-authored-by: Davin McCall <davmac at davmac.org>
> ---
> I took Ian's suggestion to add get_head_raw() and get_tail_raw() methods
> and use them in place of head_sentinel.next and tail_sentinel.prev.
>
>  src/compiler/glsl/ast.h                            |   4 +-
>  src/compiler/glsl/ast_function.cpp                 |  22 +--
>  src/compiler/glsl/ast_to_hir.cpp                   |   6 +-
>  src/compiler/glsl/ast_type.cpp                     |   2 +-
>  src/compiler/glsl/glsl_parser_extras.cpp           |   6 +-
>  src/compiler/glsl/ir.cpp                           |   8 +-
>  src/compiler/glsl/ir_clone.cpp                     |   2 +-
>  src/compiler/glsl/ir_constant_expression.cpp       |   2 +-
>  src/compiler/glsl/ir_function.cpp                  |  14 +-
>  src/compiler/glsl/ir_reader.cpp                    |   4 +-
>  src/compiler/glsl/ir_validate.cpp                  |   4 +-
>  src/compiler/glsl/list.h                           | 184 ++++++++++++---------
>  src/compiler/glsl/lower_distance.cpp               |   4 +-
>  src/compiler/glsl/lower_jumps.cpp                  |   2 +-
>  src/compiler/glsl/lower_packed_varyings.cpp        |   8 +-
>  src/compiler/glsl/lower_tess_level.cpp             |   4 +-
>  src/compiler/glsl/opt_conditional_discard.cpp      |   6 +-
>  src/compiler/glsl/opt_dead_builtin_varyings.cpp    |   2 +-
>  src/compiler/glsl/opt_dead_code.cpp                |   2 +-
>  src/compiler/glsl/opt_flatten_nested_if_blocks.cpp |   2 +-
>  src/compiler/nir/nir.h                             |   4 +-
>  src/compiler/nir/nir_opt_gcm.c                     |   2 +-
>  src/mesa/drivers/dri/i965/brw_cfg.h                |   2 +-
>  src/mesa/drivers/dri/i965/brw_fs_builder.h         |   2 +-
>  src/mesa/drivers/dri/i965/brw_vec4_builder.h       |   2 +-
>  25 files changed, 164 insertions(+), 136 deletions(-)
>
> diff --git a/src/compiler/glsl/ast.h b/src/compiler/glsl/ast.h
> index 06c7b03..fa5a731 100644
> --- a/src/compiler/glsl/ast.h
> +++ b/src/compiler/glsl/ast.h
> @@ -346,8 +346,8 @@ public:
>
>     bool is_single_dimension() const
>     {
> -      return this->array_dimensions.tail_pred->prev != NULL &&
> -             this->array_dimensions.tail_pred->prev->is_head_sentinel();
> +      return this->array_dimensions.get_tail_raw()->prev != NULL &&
> +             this->array_dimensions.get_tail_raw()->is_head_sentinel();

There's a missing ->prev on this line. Fixed locally, and passes Jenkins.


More information about the mesa-dev mailing list