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:
parent
b5a009347e
commit
f8d922b27c
2 changed files with 7 additions and 7 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue