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.
This commit is contained in:
parent
b15a6d47dc
commit
bcc90d074e
1 changed files with 2 additions and 2 deletions
4
rega.c
4
rega.c
|
@ -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];
|
||||
|
|
Loading…
Add table
Reference in a new issue