qbe

Internal scc patchset buffer for QBE
Log | Files | Refs | README | LICENSE

commit 2273d22ced916fa06a46e3f4894dbb9c04f0c640
parent aa9dc343995ef2eafcb3ef630e2ab8e3ec61ac4f
Author: Quentin Carbonneaux <quentin.carbonneaux@yale.edu>
Date:   Sat, 26 Sep 2015 16:34:18 -0400

do not merge phi classes of interfering temps

Diffstat:
Mlisc/ssa.c | 8++++++++
1 file changed, 8 insertions(+), 0 deletions(-)

diff --git a/lisc/ssa.c b/lisc/ssa.c @@ -107,6 +107,7 @@ phirepr(Tmp *tmp, int t) } /* fill union find data for phi classes + * requires live */ void fillphi(Fn *fn) @@ -129,6 +130,13 @@ fillphi(Fn *fn) if (rtype(p->arg[a]) != RTmp) continue; ta = p->arg[a].val; + if (BGET(b->in, ta)) + /* do not merge the + * classes of phi args + * that outlive the phi + * node + */ + continue; ta = phirepr(tmp, ta); tmp[ta].phi = t; }