[PATCH 5/8] trivial-phi: early return

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

 



Once it has been detected that not all values are the same, nothing
can change this fact. So, the function trivial_phi() can return its
result as soon as this condition is met.

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

diff --git a/simplify.c b/simplify.c
index b9f13f655..5413e1dd3 100644
--- a/simplify.c
+++ b/simplify.c
@@ -202,7 +202,7 @@ static int trivial_phi(pseudo_t *pseudo, struct instruction *insn)
 		}
 		if (last->phi_src == def->phi_src)
 			continue;
-		same = 0;
+		return 0;
 	} END_FOR_EACH_PTR(phi);
 
 	if (same)
-- 
2.18.0




[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