[llvm] 5a20a07 - [AArch64] Fix -Wunused-variable in AArch64FrameLowering.cpp (NFC)
Jie Fu via llvm-commits
llvm-commits at lists.llvm.org
Fri May 17 01:38:30 PDT 2024
Author: Jie Fu
Date: 2024-05-17T16:37:43+08:00
New Revision: 5a20a07fce88d54cf01cafde489bfc2fc447acc0
URL: https://github.com/llvm/llvm-project/commit/5a20a07fce88d54cf01cafde489bfc2fc447acc0
DIFF: https://github.com/llvm/llvm-project/commit/5a20a07fce88d54cf01cafde489bfc2fc447acc0.diff
LOG: [AArch64] Fix -Wunused-variable in AArch64FrameLowering.cpp (NFC)
llvm-project/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp:3084:31:
error: unused variable 'Subtarget' [-Werror,-Wunused-variable]
const AArch64Subtarget &Subtarget = MF.getSubtarget<AArch64Subtarget>();
^
llvm-project/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp:3253:31:
error: unused variable 'Subtarget' [-Werror,-Wunused-variable]
const AArch64Subtarget &Subtarget = MF.getSubtarget<AArch64Subtarget>();
^
2 errors generated.
Added:
Modified:
llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp b/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
index 239862756fc47..dc7759367687b 100644
--- a/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
+++ b/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
@@ -3081,7 +3081,8 @@ bool AArch64FrameLowering::spillCalleeSavedRegisters(
}
if (RPI.isPaired() && RPI.isScalable()) {
- const AArch64Subtarget &Subtarget = MF.getSubtarget<AArch64Subtarget>();
+ [[maybe_unused]] const AArch64Subtarget &Subtarget =
+ MF.getSubtarget<AArch64Subtarget>();
AArch64FunctionInfo *AFI = MF.getInfo<AArch64FunctionInfo>();
unsigned PnReg = AFI->getPredicateRegForFillSpill();
assert(((Subtarget.hasSVE2p1() || Subtarget.hasSME2()) && PnReg != 0) &&
@@ -3250,7 +3251,8 @@ bool AArch64FrameLowering::restoreCalleeSavedRegisters(
AArch64FunctionInfo *AFI = MF.getInfo<AArch64FunctionInfo>();
if (RPI.isPaired() && RPI.isScalable()) {
- const AArch64Subtarget &Subtarget = MF.getSubtarget<AArch64Subtarget>();
+ [[maybe_unused]] const AArch64Subtarget &Subtarget =
+ MF.getSubtarget<AArch64Subtarget>();
unsigned PnReg = AFI->getPredicateRegForFillSpill();
assert(((Subtarget.hasSVE2p1() || Subtarget.hasSME2()) && PnReg != 0) &&
"Expects SVE2.1 or SME2 target and a predicate register");
More information about the llvm-commits
mailing list