To prepare the handling of OP_ASM instructions, reorganize the opcode tests to use a switch. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx> --- flow.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/flow.c b/flow.c index bda277aa551b..5751ce756518 100644 --- a/flow.c +++ b/flow.c @@ -490,12 +490,15 @@ static inline int distinct_symbols(pseudo_t a, pseudo_t b) */ int dominates(pseudo_t pseudo, struct instruction *insn, struct instruction *dom, int local) { - int opcode = dom->opcode; - - if (opcode == OP_CALL || opcode == OP_ENTRY) + switch (dom->opcode) { + case OP_CALL: case OP_ENTRY: return local ? 0 : -1; - if (opcode != OP_LOAD && opcode != OP_STORE) + case OP_LOAD: case OP_STORE: + break; + default: return 0; + } + if (dom->src != pseudo) { if (local) return 0; -- 2.30.0