summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/glsl_parser_extras.cpp
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2016-06-27 14:42:57 -0700
committerMatt Turner <[email protected]>2016-07-26 12:12:27 -0700
commitd1f6f656973a2e18641441e3c97b30799a82de52 (patch)
tree9865209c0ac9013e682cde4862ed254a3e1c9a68 /src/compiler/glsl/glsl_parser_extras.cpp
parent5d76690f170de9acc541aa6b4a507ccd20a78158 (diff)
glsl: Separate overlapping sentinel nodes in exec_list.
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 <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/compiler/glsl/glsl_parser_extras.cpp')
-rw-r--r--src/compiler/glsl/glsl_parser_extras.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/compiler/glsl/glsl_parser_extras.cpp b/src/compiler/glsl/glsl_parser_extras.cpp
index ff638fd8013..e7022919750 100644
--- a/src/compiler/glsl/glsl_parser_extras.cpp
+++ b/src/compiler/glsl/glsl_parser_extras.cpp
@@ -833,7 +833,7 @@ _mesa_ast_set_aggregate_type(const glsl_type *type,
* E.g., if <type> if struct S[2] we want to set each element's type to
* struct S.
*/
- for (exec_node *expr_node = ai->expressions.head;
+ for (exec_node *expr_node = ai->expressions.get_head_raw();
!expr_node->is_tail_sentinel();
expr_node = expr_node->next) {
ast_expression *expr = exec_node_data(ast_expression, expr_node,
@@ -845,7 +845,7 @@ _mesa_ast_set_aggregate_type(const glsl_type *type,
/* If the aggregate is a struct, recursively set its fields' types. */
} else if (type->is_record()) {
- exec_node *expr_node = ai->expressions.head;
+ exec_node *expr_node = ai->expressions.get_head_raw();
/* Iterate through the struct's fields. */
for (unsigned i = 0; !expr_node->is_tail_sentinel() && i < type->length;
@@ -859,7 +859,7 @@ _mesa_ast_set_aggregate_type(const glsl_type *type,
}
/* If the aggregate is a matrix, set its columns' types. */
} else if (type->is_matrix()) {
- for (exec_node *expr_node = ai->expressions.head;
+ for (exec_node *expr_node = ai->expressions.get_head_raw();
!expr_node->is_tail_sentinel();
expr_node = expr_node->next) {
ast_expression *expr = exec_node_data(ast_expression, expr_node,