diff options
| author | Quentin Carbonneaux <[email protected]> | 2019-03-09 22:35:09 +0100 |
|---|---|---|
| committer | Quentin Carbonneaux <[email protected]> | 2019-03-09 22:35:09 +0100 |
| commit | bcc90d074e91c8e5d65876225d0b9f2c91c4248d (patch) | |
| tree | 0516f02f701eebb5256809df174bd33cb8cbdf07 /rega.c | |
| parent | b15a6d47dc666d660c9cb5b7b75337492896902c (diff) | |
make sure phis are temporaries in rega
In fact, after spilling, a phi
can be a temporary or a slot.
I am now pondering whether this
is a good idea or not because
it causes annoying mem->mem
movs after register allocation.
Diffstat (limited to 'rega.c')
| -rw-r--r-- | rega.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -562,8 +562,8 @@ rega(Fn *fn) * predecessor, we have to find the * corresponding argument */ for (p=s->phi; p; p=p->link) { - r = rfind(m, p->to.val); - if (r == -1) + if (rtype(p->to) != RTmp + || (r=rfind(m, p->to.val)) == -1) continue; for (u=0; u<p->narg; u++) { b = p->blk[u]; |
