hack to enable proper regalloc on calls

I add the dual to dummy uses: dummy defs.  They
are compiled to nothing, but help preserving the
invariants I had when writing the register
allocator.

Clearly, there should be a better way.
This commit is contained in:
Quentin Carbonneaux 2015-09-12 20:42:20 -04:00
parent b5a009347e
commit f8d922b27c
2 changed files with 7 additions and 7 deletions

View file

@ -192,7 +192,7 @@ eins(Ins i, Fn *fn, FILE *f)
i.arg[0], i.wide, i.to);
break;
case OCopy:
if (req(i.to, R))
if (req(i.to, R) || req(i.arg[0], R))
break;
if (isreg(i.to)
&& i.wide