[PATCH 1/5] let replace_with_pseudo() use kill_instruction()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In replace_with_pseudo(), the replaced instruction needs to be killed
and for this contains ts own code.

But this is a duplication of what is already done in kill_instruction().

So, replace this part of the code by a cal to kill_instruction().

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx>
---
 simplify.c | 18 +-----------------
 1 file changed, 1 insertion(+), 17 deletions(-)

diff --git a/simplify.c b/simplify.c
index de03d315ec33..29b368e94ff4 100644
--- a/simplify.c
+++ b/simplify.c
@@ -445,23 +445,7 @@ static inline int replace_pseudo(struct instruction *insn, pseudo_t *pp, pseudo_
 static int replace_with_pseudo(struct instruction *insn, pseudo_t pseudo)
 {
 	convert_instruction_target(insn, pseudo);
-
-	switch (insn->opcode) {
-	case OP_SEL:
-	case OP_RANGE:
-		kill_use(&insn->src3);
-	case OP_BINARY ... OP_BINCMP_END:
-		kill_use(&insn->src2);
-	case OP_UNOP ... OP_UNOP_END:
-	case OP_SYMADDR:
-		kill_use(&insn->src1);
-		break;
-
-	default:
-		assert(0);
-	}
-	insn->bb = NULL;
-	return REPEAT_CSE;
+	return kill_instruction(insn);
 }
 
 static inline int replace_with_value(struct instruction *insn, long long val)
-- 
2.29.2




[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux