Because we shift the stack pointer by an unknown amount, we need an
additional pointer. In the case where we have variable-size objects
as well, we can't reuse the frame pointer, thus three pointers.
Details
Diff Detail
- Build Status
Buildable 989 Build 989: arc lint + arc unit
Event Timeline
lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp | ||
---|---|---|
40 | Maybe clarify that "overaligned" means more aligned than the stack pointer (rather than more than natural alignment for the slot itself). | |
test/CodeGen/WebAssembly/alignment.ll | ||
1 | alignment.ll seems a bit generic. It could probably be stack-aligment or else these tests could just be added to userstack.ll | |
29 | Might as well check for the value of the const too, so we know the alignment is 16. | |
34 | Seems like we should be storing directly from BP. Where does this copy_local come from? |
test/CodeGen/WebAssembly/alignment.ll | ||
---|---|---|
34 | Huh. This is caused by us emitting a frame pointer, and register stackification doing magic to it. Prolog/epilogue:
Reg stackify:
The good news is this just gets translated to get_local in s2wasm. And adding -wasm-explicit-locals models it that was as well, so there's no actual cost here, it's just kinda quirky. |
Maybe clarify that "overaligned" means more aligned than the stack pointer (rather than more than natural alignment for the slot itself).