commit 0679df0b5620c032f4e2a17ab5faa94ff1ea3ce9
parent 07c46bc6f905f3a70a043d633a7ec4b879f4db15
Author: Quentin Carbonneaux <quentin.carbonneaux@yale.edu>
Date: Sun, 1 Nov 2015 13:55:06 -0500
break Tmp.phi chains at phi nodes
This makes sure the Tmp.phi "chain" is at most
two elements long. Something smarted could be
possible, but union-find with path compression
is still not exactly what I want.
Diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lisc/parse.c b/lisc/parse.c
@@ -547,7 +547,9 @@ DoOp:
arg[i] = parseref();
if (req(arg[i], R))
err("invalid instruction argument");
- if (op == -1 && rtype(arg[i]) == RTmp)
+ if (op == -1)
+ if (rtype(arg[i]) == RTmp)
+ if (!tmp[arg[i].val].phi)
tmp[arg[i].val].phi = r.val;
i++;
t = peek();
@@ -570,6 +572,7 @@ DoOp:
curi++;
return PIns;
} else {
+ tmp[r.val].phi = r.val;
phi = alloc(sizeof *phi);
phi->to = r;
phi->wide = w;