[PATCH v2 5/5] no VOID test in convert_instruction_target()

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

 



In convert_instruction_target(), when replacing the pseudo
in the target user list, it's first checked if the old pseudo
is not VOID and nothing is done otherwise. But this test is
not needed because:
1) the only case where VOID is stored in the user list is when
   a BB is killed and a killed instruction wouln't be converted
2) this test used to be needed when OP_PHIs were converted during
   CSE (meaning that the pseudo stored there have been removed
   from the list) but OP_PHIs are not CSEed anymore.

So, removed this unneeded test.

This gives a speedup up to 9% in some pathological workloads.

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

diff --git a/flow.c b/flow.c
index 9483938fb..0fdbdf44d 100644
--- a/flow.c
+++ b/flow.c
@@ -292,10 +292,7 @@ void convert_instruction_target(struct instruction *insn, pseudo_t src)
 	if (target == src)
 		return;
 	FOR_EACH_PTR(target->users, pu) {
-		if (*pu->userp != VOID) {
-			assert(*pu->userp == target);
-			*pu->userp = src;
-		}
+		*pu->userp = src;
 	} END_FOR_EACH_PTR(pu);
 	if (has_use_list(src))
 		concat_user_list(target->users, &src->users);
-- 
2.18.0

--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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