heavy modification of call handling
The IR generated by calls was very bulky because two instructions were used for marking the live range of a clobber. This patch attempts to store the information of what registers are use/def/clobber in the call instruction itself, this leads to more compact code (even more when we'll have SSE registers). However, I find that the amount of extra code needed is not really easonable. Fortunately it is not too invasive, thus if the complexity creeps in, it should be easy to revert.
This commit is contained in:
parent
bad74e6dce
commit
f7bfa2e435
7 changed files with 125 additions and 39 deletions
|
@ -779,8 +779,11 @@ printref(Ref r, Fn *fn, FILE *f)
|
|||
case RSlot:
|
||||
fprintf(f, "S%d", r.val);
|
||||
break;
|
||||
case RTyp:
|
||||
fprintf(f, ":%s", typ[r.val].name);
|
||||
case RAlt:
|
||||
if (r.val & RCallm)
|
||||
fprintf(f, "%x", r.val & (RCallm-1));
|
||||
else
|
||||
fprintf(f, ":%s", typ[r.val].name);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue