Closed GoogleCodeExporter closed 9 years ago
I already considered this optimization. It should not be too hard.
However, care must be taken, when arguments to function are more complex.
Computation of an argument alone will use the the registers, so anything loaded
in advance would be lost.
So basically we need to:
1. compute every argument and store it to temporary variable
2. load some parameters into registers
3. call the function
This could however create unnecessary temporary variables, so first we need to
program algorithm for reuse of dead temporary variables.
Original comment by rudla.ku...@gmail.com
on 17 Jan 2011 at 8:56
Original comment by rudla.ku...@gmail.com
on 17 Jan 2011 at 8:57
Original comment by rudla.ku...@gmail.com
on 17 Jan 2011 at 8:57
It cound be a simpler version for the start point.
When there are three or less bytes of arguments (car and byte for ex.) there is
the other kind of procedule call protocol. Else switch to the default protocol.
Original comment by jakub.hu...@gmail.com
on 18 Jan 2011 at 11:39
Dead temporary reuse is not done yet.
However I decided it should not pose so big problems, as most load/stores to
those temporaries will be removed by optimizer anyways.
Original comment by rudla.ku...@gmail.com
on 24 Jan 2011 at 4:35
Original issue reported on code.google.com by
jakub.hu...@gmail.com
on 17 Jan 2011 at 3:00