[all-commits] [llvm/llvm-project] 4e2364: [LoongArch] Add emergency spill slot for GPR for l...
wanglei via All-commits
all-commits at lists.llvm.org
Fri Oct 28 02:52:43 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 4e2364a2851f370757ef15f44cea3184cf645c93
https://github.com/llvm/llvm-project/commit/4e2364a2851f370757ef15f44cea3184cf645c93
Author: wanglei <wanglei at loongson.cn>
Date: 2022-10-28 (Fri, 28 Oct 2022)
Changed paths:
M llvm/lib/Target/LoongArch/LoongArchFrameLowering.cpp
M llvm/lib/Target/LoongArch/LoongArchFrameLowering.h
A llvm/test/CodeGen/LoongArch/emergency-spill-slot.ll
M llvm/test/CodeGen/LoongArch/frame.ll
M llvm/test/CodeGen/LoongArch/split-sp-adjust.ll
M llvm/test/CodeGen/LoongArch/stack-realignment.ll
Log Message:
-----------
[LoongArch] Add emergency spill slot for GPR for large frames
An emergency spill slot is created when the stack size cannot be
represented by an 11-bit signed number.
This patch also modifies how the `sp` is adjusted in the prologue.
`RegScavenger` will place the spill instruction before the prologue
if a VReg is created in the prologue. This will pollute the caller's
stack data. Therefore, until there is better way, we just use the
`addi.w/d` instruction for stack adjustment to ensure that VReg will
not be created. (RISCV has the same issue #58286)
Due to the addition of emergency spill slot, some test cases that use
exact stacksize need to be updated.
Differential Revision: https://reviews.llvm.org/D135757
More information about the All-commits
mailing list