mu-impl-fast issueshttps://gitlab.anu.edu.au/mu/mu-impl-fast/-/issues2017-07-20T00:19:37+10:00https://gitlab.anu.edu.au/mu/mu-impl-fast/-/issues/62Eliminating jump to jump pattern2017-07-20T00:19:37+10:00Yi LinEliminating jump to jump patternFor code such as:
```
jmp L1
...
L1:
jmp L2
```
we should capture this (probably in peephole optimization), and replace it as:
```
jmp L2
...
```For code such as:
```
jmp L1
...
L1:
jmp L2
```
we should capture this (probably in peephole optimization), and replace it as:
```
jmp L2
...
```https://gitlab.anu.edu.au/mu/mu-impl-fast/-/issues/61Inline functions with TAILLCALL's2017-09-09T02:33:04+10:00Isaac Garianoisaac@ecs.vuw.ac.nzInline functions with TAILLCALL'sInlining a function with a tailcall like any other function will break the tailcall (as it will cause the function calling the inlined function to return, and not the inlined function), we could however easily inline such a function acco...Inlining a function with a tailcall like any other function will break the tailcall (as it will cause the function calling the inlined function to return, and not the inlined function), we could however easily inline such a function according to the following rules:
* If the TAILCALL is recursive (i.e. calls the containing function itself) change it to a BRANCH to the Inlined entry block
* Otherwise expand out the tailcall into an equivalent pair of CALL and RET instructions, and inline as normal
In both these cases (assuming the function is otherwise suitable to inline), inlining should be more efficient than calling the function that tailcalls.
However inlining functions (with or without tailcalls) may break OSR which seems to expect every function call to have it's own frame (except tailcalls replace the CALLER's frame).https://gitlab.anu.edu.au/mu/mu-impl-fast/-/issues/46Fix frame slot offset after register allocation2017-06-28T17:27:09+10:00Yi LinFix frame slot offset after register allocationZebu is doing the following things regarding frame size in this order:
1. emit code to save callee saved registers and reserve frame slots for them
1. do register allocation, spill registers and reserve frame slots for them
1. rewrite co...Zebu is doing the following things regarding frame size in this order:
1. emit code to save callee saved registers and reserve frame slots for them
1. do register allocation, spill registers and reserve frame slots for them
1. rewrite code, and redo register allocation until finished
1. figure out which callee saved registers are not used, and remove the saving/restoring code for them
1. patch the frame size
We do not know the actual frame size until 3 is done. However, in 2, we need to make assumptions and emit code about frame slots.
Currently though we patch the frame size in the end, we do not deduct the space initially reserved for unused callee saved register.
We should offset all the frame slots, and patch spilled location in the code.Yi LinYi Lin