diff options
| -rw-r--r-- | flow.c | 28 |
1 files changed, 14 insertions, 14 deletions
@@ -570,26 +570,26 @@ static void kill_dead_stores_bb(pseudo_t pseudo, unsigned long generation, struc return; bb->generation = generation; FOR_EACH_PTR_REVERSE(bb->insns, insn) { - int opcode = insn->opcode; - if (!insn->bb) continue; - if (opcode != OP_LOAD && opcode != OP_STORE) { - if (local) - continue; - if (opcode == OP_CALL) + switch (insn->opcode) { + case OP_LOAD: + if (insn->src == pseudo) return; - continue; - } - if (insn->src == pseudo) { - if (opcode == OP_LOAD) + break; + case OP_STORE: + if (insn->src == pseudo) { + kill_instruction_force(insn); + continue; + } + break; + case OP_CALL: + if (!local) return; - kill_instruction_force(insn); + default: continue; } - if (local) - continue; - if (insn->src->type != PSEUDO_SYM) + if (!local && insn->src->type != PSEUDO_SYM) return; } END_FOR_EACH_PTR_REVERSE(insn); |
