[PATCH] D62007: [RISCV] Minimal stack realignment support

weiwei via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 31 07:51:47 PDT 2019


wwei added a comment.

@lenary @asb It seems that `PEI::calculateFrameObjectOffsets` function in `PrologEpilogInserter` pass has done some stack size rounding up work. Each stack object will call `AdjustStackOffset` to adjust the stack frame offset, and corresponding update may be made for `MaxAlign`.
Also, there's a TFI hook `targetHandlesStackFrameRounding` to decide if the target is responsible for rounding up the stack frame(default return false). For RISCV, maybe this function should return true I think, thus the stack size for StackRealignment will be calculated at RISCV's emitPrologue time.
For the implementation in this patch, the stack size for StackRealignment will be calculathed two times, one in `PEI::calculateFrameObjectOffsets`, another time in `RISCVFrameLowering::determineFrameLayout`, and the stack size may become bigger.)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D62007/new/

https://reviews.llvm.org/D62007





More information about the llvm-commits mailing list