mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-27 15:20:37 +02:00
glsl: Teach basic block analysis about break/continue/discard.
Previously, the only kind of ir_jump that would terminate a basic
block was "return". However, the other possible types of ir_jump
("break", "continue", and "discard") should terminate a basic block
too. This patch modifies basic block analysis so that it terminates a
basic block on any type of ir_jump, not just ir_return.
Fixes piglit test dead-code-break-interaction.shader_test.
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
70ca263623
commit
5bb90cfceb
1 changed files with 1 additions and 1 deletions
|
|
@ -77,7 +77,7 @@ void call_for_basic_blocks(exec_list *instructions,
|
|||
callback(leader, ir, data);
|
||||
leader = NULL;
|
||||
call_for_basic_blocks(&ir_loop->body_instructions, callback, data);
|
||||
} else if (ir->as_return() || ir->as_call()) {
|
||||
} else if (ir->as_jump() || ir->as_call()) {
|
||||
callback(leader, ir, data);
|
||||
leader = NULL;
|
||||
} else if ((ir_function = ir->as_function())) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue