glsl: don't drop instructions from unreachable terminators continue branch
These instructions will be executed on every iteration of the loop we cannot drop them. V2: - move removal of unreachable terminators from the terminator list to the same place they are removed from the IR as suggested by Nicolai. Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
This commit is contained in:
@@ -34,6 +34,13 @@
|
||||
extern class loop_state *
|
||||
analyze_loop_variables(exec_list *instructions);
|
||||
|
||||
static inline bool
|
||||
is_break(ir_instruction *ir)
|
||||
{
|
||||
return ir != NULL && ir->ir_type == ir_type_loop_jump &&
|
||||
((ir_loop_jump *) ir)->is_break();
|
||||
}
|
||||
|
||||
|
||||
extern bool
|
||||
unroll_loops(exec_list *instructions, loop_state *ls,
|
||||
|
Reference in New Issue
Block a user