Skip to content

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 of MOV 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
  • In conjunction with DWARF debug information we could more easily use perf and other performance measurement tools (e.g. #15929)
Edited by Ben Gamari
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information