diff options
author | Matt Turner <[email protected]> | 2016-06-27 14:42:57 -0700 |
---|---|---|
committer | Matt Turner <[email protected]> | 2016-07-26 12:12:27 -0700 |
commit | d1f6f656973a2e18641441e3c97b30799a82de52 (patch) | |
tree | 9865209c0ac9013e682cde4862ed254a3e1c9a68 /src/compiler/glsl/ir.cpp | |
parent | 5d76690f170de9acc541aa6b4a507ccd20a78158 (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/ir.cpp')
-rw-r--r-- | src/compiler/glsl/ir.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/compiler/glsl/ir.cpp b/src/compiler/glsl/ir.cpp index b049fda3a66..2aa4affac9d 100644 --- a/src/compiler/glsl/ir.cpp +++ b/src/compiler/glsl/ir.cpp @@ -807,7 +807,7 @@ ir_constant::ir_constant(const struct glsl_type *type, exec_list *value_list) this->value.u[i] = 0; } - ir_constant *value = (ir_constant *) (value_list->head); + ir_constant *value = (ir_constant *) (value_list->get_head_raw()); /* Constructors with exactly one scalar argument are special for vectors * and matrices. For vectors, the scalar value is replicated to fill all @@ -1073,7 +1073,7 @@ ir_constant::get_record_field(const char *name) if (this->components.is_empty()) return NULL; - exec_node *node = this->components.head; + exec_node *node = this->components.get_head_raw(); for (int i = 0; i < idx; i++) { node = node->next; @@ -1197,8 +1197,8 @@ ir_constant::has_value(const ir_constant *c) const } if (this->type->base_type == GLSL_TYPE_STRUCT) { - const exec_node *a_node = this->components.head; - const exec_node *b_node = c->components.head; + const exec_node *a_node = this->components.get_head_raw(); + const exec_node *b_node = c->components.get_head_raw(); while (!a_node->is_tail_sentinel()) { assert(!b_node->is_tail_sentinel()); |