diff options
author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2020-11-21 18:08:07 +0100 |
---|---|---|
committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2020-11-21 18:15:15 +0100 |
commit | 15bea3b0bbe7bab1d081aae9262e867366aff324 (patch) | |
tree | 10743bd1253bb5a98604ea48ae067fbe39095ce2 | |
parent | a56c36499b686be9cd388b31820f3aa70226dd9f (diff) | |
download | sparse-15bea3b0bbe7bab1d081aae9262e867366aff324.tar.gz |
simplify kill_insn() of unops and unop-ish instructions
In instructions, the first pseudo operands exist under different
names (.src1, .src, .cond, .phi_src) all aliased to each other.
Use this to simplify unops and others instructions with a single
pseudo operand.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
-rw-r--r-- | simplify.c | 18 |
1 files changed, 5 insertions, 13 deletions
@@ -324,24 +324,16 @@ int kill_insn(struct instruction *insn, int force) case OP_UNOP ... OP_UNOP_END: case OP_SLICE: - kill_use(&insn->src1); - break; - - case OP_PHI: - kill_use_list(insn->phi_list); - break; case OP_PHISOURCE: - kill_use(&insn->phi_src); - break; - case OP_SYMADDR: - kill_use(&insn->src); - break; - case OP_CBR: case OP_SWITCH: case OP_COMPUTEDGOTO: - kill_use(&insn->cond); + kill_use(&insn->src1); + break; + + case OP_PHI: + kill_use_list(insn->phi_list); break; case OP_CALL: |