Ensure callee-saved registers are accessed relative to the stackpointer.
Depends on D128429
Paths
| Differential D128430
[LoongArch] Support lowering FrameIndex ClosedPublic Authored by wangleiat on Jun 23 2022, 5:14 AM.
Details
Diff Detail
Event Timelinewangleiat added a child revision: D128432: [LoongArch] Implement prologue/epilogue insertion.Jun 23 2022, 5:18 AM Comment Actions The other changes look good.
Comment Actions LGTM apart from the stack ID assertion bit; @SixWeining do you think an assertion should be present nevertheless even if we're only using one type of stack currently? This revision is now accepted and ready to land.Jul 4 2022, 9:53 PM Comment Actions
I think either is fine. I think the reason RISCV does an assertion is that it sets non-default stack ID in its .cpp code. This revision was landed with ongoing or failed builds.Jul 6 2022, 12:42 AM Closed by commit rG5b1ec705904a: [LoongArch] Support lowering FrameIndex (authored by wangleiat, committed by SixWeining). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 442452 llvm/lib/Target/LoongArch/LoongArchFrameLowering.h
llvm/lib/Target/LoongArch/LoongArchFrameLowering.cpp
llvm/lib/Target/LoongArch/LoongArchISelDAGToDAG.h
llvm/lib/Target/LoongArch/LoongArchISelDAGToDAG.cpp
llvm/lib/Target/LoongArch/LoongArchInstrInfo.td
llvm/test/CodeGen/LoongArch/frame.ll
|
This implementation is a simplified version of RISCV's getFrameIndexReference, but we're missing a stack ID check before this. I know we're not utilizing any non-default stack IDs so far but I don't know if such a check/assertion should be kept anyway.