Skip to content

Commit b5255b4

Browse files
committed
Shrink size of glue calls. Wins a few tens of kb on rustc.
1 parent 07d355d commit b5255b4

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/boot/me/trans.ml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1798,8 +1798,6 @@ let trans_visitor
17981798
(clo:Il.cell option)
17991799
: unit =
18001800
let inner dst cloptr =
1801-
let scratch = next_vreg_cell Il.voidptr_t in
1802-
let pop _ = emit (Il.Pop scratch) in
18031801
for i = ((Array.length args) - 1) downto 0
18041802
do
18051803
emit (Il.Push (Il.Cell args.(i)))
@@ -1808,10 +1806,8 @@ let trans_visitor
18081806
emit (Il.Push (Il.Cell abi.Abi.abi_tp_cell));
18091807
emit (Il.Push dst);
18101808
call_code code;
1811-
pop ();
1812-
pop ();
1813-
pop ();
1814-
Array.iter (fun _ -> pop()) args;
1809+
add_to (Il.Reg (abi.Abi.abi_sp_reg, word_sty))
1810+
(imm (Int64.mul word_sz (Int64.of_int (3 + (Array.length args)))));
18151811
in
18161812
let cloptr =
18171813
match clo with

0 commit comments

Comments
 (0)