When we don't actually have stack-allocated variables but needs SP only
to support EH, we don't need to write SP back in the epilog, because we
don't bump down the stack pointer.
Details
Diff Detail
- Repository
- rL LLVM
- Build Status
Buildable 21807 Build 21807: arc lint + arc unit
Event Timeline
lib/Target/WebAssembly/WebAssemblyEHRestoreStackPointer.cpp | ||
---|---|---|
73 | __stack_pointer | |
75 | can't leaf functions have try/catch blocks, even if there are no calls? I think the real issue is that leaf functions do not to restore the stack pointer on catch, because it won't have been updated by any callees. | |
lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp | ||
122 | Another possible way: which would avoid so many nots... Actually, even better may be to turn NeedsSPForLocalFrame() into a function (that can be called by needsSP()). Then you can reuse it here instead of duplicating the logic? |
lib/Target/WebAssembly/WebAssemblyEHRestoreStackPointer.cpp | ||
---|---|---|
75 | Right, good point. |
__stack_pointer