|
|
|
|
|
|
|
|
|
|
|
|
|
|
switch (inst->opcode) { |
|
|
switch (inst->opcode) { |
|
|
case BRW_OPCODE_IF: |
|
|
case BRW_OPCODE_IF: |
|
|
inst->remove(); |
|
|
|
|
|
|
|
|
inst->exec_node::remove(); |
|
|
cur->instructions.push_tail(inst); |
|
|
cur->instructions.push_tail(inst); |
|
|
|
|
|
|
|
|
/* Push our information onto a stack so we can recover from |
|
|
/* Push our information onto a stack so we can recover from |
|
|
|
|
|
|
|
|
break; |
|
|
break; |
|
|
|
|
|
|
|
|
case BRW_OPCODE_ELSE: |
|
|
case BRW_OPCODE_ELSE: |
|
|
inst->remove(); |
|
|
|
|
|
|
|
|
inst->exec_node::remove(); |
|
|
cur->instructions.push_tail(inst); |
|
|
cur->instructions.push_tail(inst); |
|
|
|
|
|
|
|
|
cur_else = cur; |
|
|
cur_else = cur; |
|
|
|
|
|
|
|
|
set_next_block(&cur, cur_endif, ip - 1); |
|
|
set_next_block(&cur, cur_endif, ip - 1); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
inst->remove(); |
|
|
|
|
|
|
|
|
inst->exec_node::remove(); |
|
|
cur->instructions.push_tail(inst); |
|
|
cur->instructions.push_tail(inst); |
|
|
|
|
|
|
|
|
if (cur_else) { |
|
|
if (cur_else) { |
|
|
|
|
|
|
|
|
set_next_block(&cur, cur_do, ip - 1); |
|
|
set_next_block(&cur, cur_do, ip - 1); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
inst->remove(); |
|
|
|
|
|
|
|
|
inst->exec_node::remove(); |
|
|
cur->instructions.push_tail(inst); |
|
|
cur->instructions.push_tail(inst); |
|
|
break; |
|
|
break; |
|
|
|
|
|
|
|
|
case BRW_OPCODE_CONTINUE: |
|
|
case BRW_OPCODE_CONTINUE: |
|
|
inst->remove(); |
|
|
|
|
|
|
|
|
inst->exec_node::remove(); |
|
|
cur->instructions.push_tail(inst); |
|
|
cur->instructions.push_tail(inst); |
|
|
|
|
|
|
|
|
cur->add_successor(mem_ctx, cur_do); |
|
|
cur->add_successor(mem_ctx, cur_do); |
|
|
|
|
|
|
|
|
break; |
|
|
break; |
|
|
|
|
|
|
|
|
case BRW_OPCODE_BREAK: |
|
|
case BRW_OPCODE_BREAK: |
|
|
inst->remove(); |
|
|
|
|
|
|
|
|
inst->exec_node::remove(); |
|
|
cur->instructions.push_tail(inst); |
|
|
cur->instructions.push_tail(inst); |
|
|
|
|
|
|
|
|
cur->add_successor(mem_ctx, cur_while); |
|
|
cur->add_successor(mem_ctx, cur_while); |
|
|
|
|
|
|
|
|
break; |
|
|
break; |
|
|
|
|
|
|
|
|
case BRW_OPCODE_WHILE: |
|
|
case BRW_OPCODE_WHILE: |
|
|
inst->remove(); |
|
|
|
|
|
|
|
|
inst->exec_node::remove(); |
|
|
cur->instructions.push_tail(inst); |
|
|
cur->instructions.push_tail(inst); |
|
|
|
|
|
|
|
|
cur->add_successor(mem_ctx, cur_do); |
|
|
cur->add_successor(mem_ctx, cur_do); |
|
|
|
|
|
|
|
|
break; |
|
|
break; |
|
|
|
|
|
|
|
|
default: |
|
|
default: |
|
|
inst->remove(); |
|
|
|
|
|
|
|
|
inst->exec_node::remove(); |
|
|
cur->instructions.push_tail(inst); |
|
|
cur->instructions.push_tail(inst); |
|
|
break; |
|
|
break; |
|
|
} |
|
|
} |