[PATCH] D136222: [LoongArch] Split SP adjustment

wanglei via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 23 19:10:29 PDT 2022


wangleiat added inline comments.


================
Comment at: llvm/lib/Target/LoongArch/LoongArchFrameLowering.cpp:303
+  const std::vector<CalleeSavedInfo> &CSI = MFI.getCalleeSavedInfo();
+  uint64_t StackSize = MFI.getStackSize();
+
----------------
SixWeining wrote:
> Nit: Inline one-time-used variable.
> Nit: Inline one-time-used variable.

Ok, I will fix it.


================
Comment at: llvm/test/CodeGen/LoongArch/split-sp-adjust.ll:5
+
+;; The stack size is 2048 and the SP adjustment will be split.
+define i32 @SplitSP() nounwind {
----------------
Allen wrote:
> Sorry for the naive question: do you split the offset of SP as the constraint of the load/store, which should be less than 2048 ?
Thank you very much for your interest in LoongArch.
As you guessed, if we don't split the adjustment of `SP`, the `load/store` for callee-saved registers will use multiple instructions when offset >= 2048.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D136222



More information about the llvm-commits mailing list