Consider using native stack pointer register for STG stack
There are a variety of reasons why we might want to use the native stack pointer register to track the STG stack:
- Performance might be better for a variety of reasons:
- we could possibly use
PUSH
instead ofMOV
on x86, which has a more succinct encoding - the LLVM backend would be able to make better assumptions about pointer aliasing(?)
- microarchitecture implementations likely optimise for stack accesses
- we could possibly use
- In conjunction with DWARF debug information we could more easily use
perf
and other performance measurement tools (e.g. #15929)
Edited by Ben Gamari