diff options
author | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2015-09-14 23:36:26 -0400 |
---|---|---|
committer | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2015-09-15 23:01:33 -0400 |
commit | f7bfa2e435c78917bd6df0c80e7e488751dac58c (patch) | |
tree | ff55a42ecc560ccde7af547b59c71b94afe6844b /lisc/parse.c | |
parent | bad74e6dce897df9f21cea5bf0a32df298856351 (diff) | |
download | roux-f7bfa2e435c78917bd6df0c80e7e488751dac58c.tar.gz |
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.
Diffstat (limited to 'lisc/parse.c')
-rw-r--r-- | lisc/parse.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lisc/parse.c b/lisc/parse.c index 957fae1..29f5653 100644 --- a/lisc/parse.c +++ b/lisc/parse.c @@ -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; } } |