summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/ir.cpp
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2016-06-27 14:42:57 -0700
committerMatt Turner <mattst88@gmail.com>2016-07-26 12:12:27 -0700
commitd1f6f656973a2e18641441e3c97b30799a82de52 (patch)
tree9865209c0ac9013e682cde4862ed254a3e1c9a68 /src/compiler/glsl/ir.cpp
parent5d76690f170de9acc541aa6b4a507ccd20a78158 (diff)
downloadexternal_mesa3d-d1f6f656973a2e18641441e3c97b30799a82de52.zip
external_mesa3d-d1f6f656973a2e18641441e3c97b30799a82de52.tar.gz
external_mesa3d-d1f6f656973a2e18641441e3c97b30799a82de52.tar.bz2
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 <davmac@davmac.org> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Diffstat (limited to 'src/compiler/glsl/ir.cpp')
-rw-r--r--src/compiler/glsl/ir.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/compiler/glsl/ir.cpp b/src/compiler/glsl/ir.cpp
index b049fda..2aa4aff 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());