From 425a2ed09c08222e1254d93dba24c7a50e7a08b9 Mon Sep 17 00:00:00 2001 From: Quentin Carbonneaux Date: Tue, 16 May 2017 11:33:41 -0400 Subject: do not account for interferences in phi classes Before this commit, I tried to make sure that two interfering temporaries never ended up in the same phi class. This was to make sure that their register hints were not counterproductively stepping on each other's toes. The idea is fine, but: * the implementation is clumsy because it mixes the orthogonal concepts of (i) interference and (ii) phi classes; * the hinting process in the register allocator is hard to understand because the disjoint-set data structure used for phi classes is cut in arbitrary places. After this commit, the phi classes *really* are phi classes represented with a proper disjoint-set data structure. --- util.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'util.c') diff --git a/util.c b/util.c index 4144f87..cb6e75c 100644 --- a/util.c +++ b/util.c @@ -249,24 +249,16 @@ clsmerge(short *pk, short k) } int -phicls(int t, Tmp *tmp /*, int c*/) +phicls(int t, Tmp *tmp) { - if (tmp[t].phi) - return tmp[t].phi; - return t; -#if 0 int t1; t1 = tmp[t].phi; if (!t1) - t1 = t; - if (t != t1) { - t1 = phitmp(t1, tmp, c); - if (c) - tmp[t].phi = t1; - } + return t; + t1 = phicls(t1, tmp); + tmp[t].phi = t1; return t1; -#endif } Ref -- cgit 1.4.1