diff options
author | Ori Bernstein <ori@eigenstate.org> | 2013-02-06 00:42:58 -0500 |
---|---|---|
committer | Ori Bernstein <ori@eigenstate.org> | 2013-02-06 00:43:04 -0500 |
commit | cef9f9cc57105139c4157fdfb14036c724271271 (patch) | |
tree | 08a404353f72e34fb6b4318027f41859c1d4da5a | |
parent | a3a707822d301c6c1e3cfd164c35e67463406397 (diff) | |
download | mc-cef9f9cc57105139c4157fdfb14036c724271271.tar.gz |
Document decdegree()'s subtlety.
It's tricky, the way that we use worklists as sets, but
only here.
-rw-r--r-- | 6/ra.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -556,6 +556,18 @@ static void decdegree(Isel *s, regid m) enablemove(s, m); for (n = 0; adjiter(s, m, &n); n++) enablemove(s, n); + + /* Subtle: + * + * If this code is being called from coalesce(), + * then the degree could have been bumped up only + * temporarily. This means that the node can already + * be on wlfreeze or wlsimp. + * + * Therefore, if we don't find it on wlspill, we assert + * that the node is already on the list that we'd be + * moving it to. + */ found = wlhas(s->wlspill, s->nwlspill, m, &idx); if (found) ldel(&s->wlspill, &s->nwlspill, idx); |