diff options
author | Quentin Carbonneaux <quentin@c9x.me> | 2017-05-16 11:33:41 -0400 |
---|---|---|
committer | Quentin Carbonneaux <quentin@c9x.me> | 2017-05-16 11:33:41 -0400 |
commit | 425a2ed09c08222e1254d93dba24c7a50e7a08b9 (patch) | |
tree | 8637b9bcc9574e44e078994a4ea514289729e106 /util.c | |
parent | 51c46ba6914741cbca54d3351f8cf8d2689fd3dc (diff) | |
download | roux-425a2ed09c08222e1254d93dba24c7a50e7a08b9.tar.gz |
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.
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 16 |
1 files changed, 4 insertions, 12 deletions
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 |