[llvm] a7a0b82 - [AArch64] NFC: Remove unused parameter from allocateLazySaveBuffer
Sander de Smalen via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 9 07:53:23 PST 2022
Author: Sander de Smalen
Date: 2022-11-09T15:36:00Z
New Revision: a7a0b825bd9630ad9edb073a9fc853059cf7f1c7
URL: https://github.com/llvm/llvm-project/commit/a7a0b825bd9630ad9edb073a9fc853059cf7f1c7
DIFF: https://github.com/llvm/llvm-project/commit/a7a0b825bd9630ad9edb073a9fc853059cf7f1c7.diff
LOG: [AArch64] NFC: Remove unused parameter from allocateLazySaveBuffer
Added:
Modified:
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
llvm/lib/Target/AArch64/AArch64ISelLowering.h
llvm/lib/Target/AArch64/AArch64MachineFunctionInfo.h
Removed:
################################################################################
diff --git a/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp b/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
index f58b7c4c3b7c..cc77a37f5998 100644
--- a/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+++ b/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
@@ -5996,8 +5996,9 @@ static bool requiresBufferForLazySave(const Function &F) {
return false;
}
-unsigned AArch64TargetLowering::allocateLazySaveBuffer(
- SDValue &Chain, const SDLoc &DL, SelectionDAG &DAG, Register &Reg) const {
+unsigned
+AArch64TargetLowering::allocateLazySaveBuffer(SDValue &Chain, const SDLoc &DL,
+ SelectionDAG &DAG) const {
MachineFunction &MF = DAG.getMachineFunction();
MachineFrameInfo &MFI = MF.getFrameInfo();
@@ -6009,7 +6010,7 @@ unsigned AArch64TargetLowering::allocateLazySaveBuffer(
SDVTList VTs = DAG.getVTList(MVT::i64, MVT::Other);
SDValue Buffer = DAG.getNode(ISD::DYNAMIC_STACKALLOC, DL, VTs, Ops);
unsigned FI = MFI.CreateVariableSizedObject(Align(1), nullptr);
- Reg = MF.getRegInfo().createVirtualRegister(getRegClassFor(MVT::i64));
+ Register Reg = MF.getRegInfo().createVirtualRegister(getRegClassFor(MVT::i64));
Chain = DAG.getCopyToReg(Buffer.getValue(1), DL, Reg, Buffer.getValue(0));
// Allocate an additional TPIDR2 object on the stack (16 bytes)
@@ -6412,9 +6413,7 @@ SDValue AArch64TargetLowering::LowerFormalArguments(
if (requiresBufferForLazySave(MF.getFunction())) {
// Set up a buffer once and store the buffer in the MachineFunctionInfo.
- Register Reg;
- unsigned TPIDR2Obj = allocateLazySaveBuffer(Chain, DL, DAG, Reg);
- FuncInfo->setLazySaveBufferReg(Reg);
+ unsigned TPIDR2Obj = allocateLazySaveBuffer(Chain, DL, DAG);
FuncInfo->setLazySaveTPIDR2Obj(TPIDR2Obj);
}
@@ -7010,10 +7009,8 @@ AArch64TargetLowering::LowerCall(CallLoweringInfo &CLI,
SDValue NN = DAG.getNode(ISD::MUL, DL, MVT::i64, N, N);
unsigned TPIDR2Obj = FuncInfo->getLazySaveTPIDR2Obj();
- if (!TPIDR2Obj) {
- Register Reg;
- TPIDR2Obj = allocateLazySaveBuffer(Chain, DL, DAG, Reg);
- }
+ if (!TPIDR2Obj)
+ TPIDR2Obj = allocateLazySaveBuffer(Chain, DL, DAG);
MachinePointerInfo MPI = MachinePointerInfo::getStack(MF, TPIDR2Obj);
SDValue TPIDR2ObjAddr = DAG.getFrameIndex(TPIDR2Obj,
diff --git a/llvm/lib/Target/AArch64/AArch64ISelLowering.h b/llvm/lib/Target/AArch64/AArch64ISelLowering.h
index 017fc63e214b..61fec7cf4504 100644
--- a/llvm/lib/Target/AArch64/AArch64ISelLowering.h
+++ b/llvm/lib/Target/AArch64/AArch64ISelLowering.h
@@ -905,7 +905,7 @@ class AArch64TargetLowering : public TargetLowering {
void addQRTypeForNEON(MVT VT);
unsigned allocateLazySaveBuffer(SDValue &Chain, const SDLoc &DL,
- SelectionDAG &DAG, Register &Reg) const;
+ SelectionDAG &DAG) const;
SDValue LowerFormalArguments(SDValue Chain, CallingConv::ID CallConv,
bool isVarArg,
diff --git a/llvm/lib/Target/AArch64/AArch64MachineFunctionInfo.h b/llvm/lib/Target/AArch64/AArch64MachineFunctionInfo.h
index c11506c898fa..fc2015cf2709 100644
--- a/llvm/lib/Target/AArch64/AArch64MachineFunctionInfo.h
+++ b/llvm/lib/Target/AArch64/AArch64MachineFunctionInfo.h
@@ -184,10 +184,6 @@ class AArch64FunctionInfo final : public MachineFunctionInfo {
/// or return type
bool IsSVECC = false;
- /// The virtual register that is the pointer to the lazy save buffer.
- /// This value is used during ISelLowering.
- Register LazySaveBufferReg = 0;
-
/// The frame-index for the TPIDR2 object used for lazy saves.
Register LazySaveTPIDR2Obj = 0;
@@ -209,9 +205,6 @@ class AArch64FunctionInfo final : public MachineFunctionInfo {
bool isSVECC() const { return IsSVECC; };
void setIsSVECC(bool s) { IsSVECC = s; };
- unsigned getLazySaveBufferReg() const { return LazySaveBufferReg; }
- void setLazySaveBufferReg(unsigned Reg) { LazySaveBufferReg = Reg; }
-
unsigned getLazySaveTPIDR2Obj() const { return LazySaveTPIDR2Obj; }
void setLazySaveTPIDR2Obj(unsigned Reg) { LazySaveTPIDR2Obj = Reg; }
More information about the llvm-commits
mailing list