linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] recursive phi_defines cannot happen
@ 2016-12-08  3:34 Luc Van Oostenryck
  0 siblings, 0 replies; only message in thread
From: Luc Van Oostenryck @ 2016-12-08  3:34 UTC (permalink / raw)
  To: linux-sparse; +Cc: Christopher Li, Luc Van Oostenryck

The function phi_defines() does the liveness tracking of phi-pseudos
(pseudos in OP_PHIs args). While doing this, the function is
recursively called when the pseudo would be defined by another phi-node;
but this condition is impossible because all phi-pseudos are defined
by OP_PHISOURCE instructions.

This patch remove the recursive call and its associated test.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
 liveness.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/liveness.c b/liveness.c
index eeff0f79..fb696720 100644
--- a/liveness.c
+++ b/liveness.c
@@ -23,10 +23,6 @@ static void phi_defines(struct instruction * phi_node, pseudo_t target,
 		def = phi->def;
 		if (!def || !def->bb)
 			continue;
-		if (def->opcode == OP_PHI) {
-			phi_defines(def, target, defines);
-			continue;
-		}
 		defines(def->bb, phi->def, target);
 	} END_FOR_EACH_PTR(phi);
 }
-- 
2.10.2


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-12-08  3:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-08  3:34 [PATCH] recursive phi_defines cannot happen Luc Van Oostenryck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).