[all-commits] [llvm/llvm-project] 98c6aa: [LoongArch] Implement LoongArchRegisterInfo::canRe...
wanglei via All-commits
all-commits at lists.llvm.org
Tue Jan 9 04:36:03 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 98c6aa72299caeff6b188e1ff2fc1b39c5b893b6
https://github.com/llvm/llvm-project/commit/98c6aa72299caeff6b188e1ff2fc1b39c5b893b6
Author: wanglei <wanglei at loongson.cn>
Date: 2024-01-09 (Tue, 09 Jan 2024)
Changed paths:
M llvm/lib/Target/LoongArch/LoongArchRegisterInfo.cpp
M llvm/lib/Target/LoongArch/LoongArchRegisterInfo.h
M llvm/test/CodeGen/LoongArch/can-not-realign-stack.ll
Log Message:
-----------
[LoongArch] Implement LoongArchRegisterInfo::canRealignStack() (#76913)
This patch fixes the crash issue in the test:
CodeGen/LoongArch/can-not-realign-stack.ll
Register allocator may spill virtual registers to the stack, which
introduces stack alignment requirements (when the size of spilled
registers exceeds the default alignment size of the stack). If a
function does not have stack alignment requirements before register
allocation, registers used for stack alignment will not be preserved.
Therefore, we should implement `canRealignStack()` to inform the
register allocator whether it is allowed to perform stack realignment
operations.
More information about the All-commits
mailing list