[llvm] 7cf26e0 - [AArch64] Fix -Wunused-function of getLivePhysRegsUpTo in AArch64FrameLowering.cpp (NFC)
Jie Fu via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 22 17:08:20 PST 2023
Author: Jie Fu
Date: 2023-11-23T09:06:48+08:00
New Revision: 7cf26e0c6decf0ca90ad0780057ffe82fe83816f
URL: https://github.com/llvm/llvm-project/commit/7cf26e0c6decf0ca90ad0780057ffe82fe83816f
DIFF: https://github.com/llvm/llvm-project/commit/7cf26e0c6decf0ca90ad0780057ffe82fe83816f.diff
LOG: [AArch64] Fix -Wunused-function of getLivePhysRegsUpTo in AArch64FrameLowering.cpp (NFC)
/llvm-project/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp:1428:13: error: unused function 'getLivePhysRegsUpTo' [-Werror,-Wunused-function]
static void getLivePhysRegsUpTo(MachineInstr &MI, const TargetRegisterInfo &TRI,
^
1 error 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 fe408dfb5a7e258..fd47970bd050596 100644
--- a/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
+++ b/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
@@ -1423,6 +1423,7 @@ static void emitDefineCFAWithFP(MachineFunction &MF, MachineBasicBlock &MBB,
.setMIFlags(MachineInstr::FrameSetup);
}
+#ifndef NDEBUG
/// Collect live registers from the end of \p MI's parent up to (including) \p
/// MI in \p LiveRegs.
static void getLivePhysRegsUpTo(MachineInstr &MI, const TargetRegisterInfo &TRI,
@@ -1434,6 +1435,7 @@ static void getLivePhysRegsUpTo(MachineInstr &MI, const TargetRegisterInfo &TRI,
reverse(make_range(MI.getIterator(), MBB.instr_end())))
LiveRegs.stepBackward(MI);
}
+#endif
void AArch64FrameLowering::emitPrologue(MachineFunction &MF,
MachineBasicBlock &MBB) const {
More information about the llvm-commits
mailing list