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/opt_conditional_discard.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/opt_conditional_discard.cpp')
-rw-r--r-- | src/compiler/glsl/opt_conditional_discard.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/compiler/glsl/opt_conditional_discard.cpp b/src/compiler/glsl/opt_conditional_discard.cpp index 1ca8803f643..03665c37364 100644 --- a/src/compiler/glsl/opt_conditional_discard.cpp +++ b/src/compiler/glsl/opt_conditional_discard.cpp @@ -65,13 +65,13 @@ opt_conditional_discard_visitor::visit_leave(ir_if *ir) { /* Look for "if (...) discard" with no else clause or extra statements. */ if (ir->then_instructions.is_empty() || - !ir->then_instructions.head->next->is_tail_sentinel() || - !((ir_instruction *) ir->then_instructions.head)->as_discard() || + !ir->then_instructions.get_head_raw()->next->is_tail_sentinel() || + !((ir_instruction *) ir->then_instructions.get_head_raw())->as_discard() || !ir->else_instructions.is_empty()) return visit_continue; /* Move the condition and replace the ir_if with the ir_discard. */ - ir_discard *discard = (ir_discard *) ir->then_instructions.head; + ir_discard *discard = (ir_discard *) ir->then_instructions.get_head_raw(); discard->condition = ir->condition; ir->replace_with(discard); |