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();
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)
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);
}
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,
/// 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;
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; }