diff options
author | shadchin <shadchin@yandex-team.ru> | 2022-02-10 16:44:30 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:44:30 +0300 |
commit | 2598ef1d0aee359b4b6d5fdd1758916d5907d04f (patch) | |
tree | 012bb94d777798f1f56ac1cec429509766d05181 /contrib/libs/llvm12/lib/Target/X86/X86CallLowering.cpp | |
parent | 6751af0b0c1b952fede40b19b71da8025b5d8bcf (diff) | |
download | ydb-2598ef1d0aee359b4b6d5fdd1758916d5907d04f.tar.gz |
Restoring authorship annotation for <shadchin@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/libs/llvm12/lib/Target/X86/X86CallLowering.cpp')
-rw-r--r-- | contrib/libs/llvm12/lib/Target/X86/X86CallLowering.cpp | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/contrib/libs/llvm12/lib/Target/X86/X86CallLowering.cpp b/contrib/libs/llvm12/lib/Target/X86/X86CallLowering.cpp index 53f57565d5..a497375bd0 100644 --- a/contrib/libs/llvm12/lib/Target/X86/X86CallLowering.cpp +++ b/contrib/libs/llvm12/lib/Target/X86/X86CallLowering.cpp @@ -95,11 +95,11 @@ bool X86CallLowering::splitToValueTypes(const ArgInfo &OrigArg, namespace { -struct X86OutgoingValueHandler : public CallLowering::OutgoingValueHandler { - X86OutgoingValueHandler(MachineIRBuilder &MIRBuilder, - MachineRegisterInfo &MRI, MachineInstrBuilder &MIB, - CCAssignFn *AssignFn) - : OutgoingValueHandler(MIRBuilder, MRI, AssignFn), MIB(MIB), +struct X86OutgoingValueHandler : public CallLowering::OutgoingValueHandler { + X86OutgoingValueHandler(MachineIRBuilder &MIRBuilder, + MachineRegisterInfo &MRI, MachineInstrBuilder &MIB, + CCAssignFn *AssignFn) + : OutgoingValueHandler(MIRBuilder, MRI, AssignFn), MIB(MIB), DL(MIRBuilder.getMF().getDataLayout()), STI(MIRBuilder.getMF().getSubtarget<X86Subtarget>()) {} @@ -134,10 +134,10 @@ struct X86OutgoingValueHandler : public CallLowering::OutgoingValueHandler { unsigned ValSize = VA.getValVT().getSizeInBits(); unsigned LocSize = VA.getLocVT().getSizeInBits(); if (PhysRegSize > ValSize && LocSize == ValSize) { - assert((PhysRegSize == 128 || PhysRegSize == 80) && - "We expect that to be 128 bit"); - ExtReg = - MIRBuilder.buildAnyExt(LLT::scalar(PhysRegSize), ValVReg).getReg(0); + assert((PhysRegSize == 128 || PhysRegSize == 80) && + "We expect that to be 128 bit"); + ExtReg = + MIRBuilder.buildAnyExt(LLT::scalar(PhysRegSize), ValVReg).getReg(0); } else ExtReg = extendRegister(ValVReg, VA); @@ -149,9 +149,9 @@ struct X86OutgoingValueHandler : public CallLowering::OutgoingValueHandler { MachineFunction &MF = MIRBuilder.getMF(); Register ExtReg = extendRegister(ValVReg, VA); - auto *MMO = MF.getMachineMemOperand(MPO, MachineMemOperand::MOStore, - VA.getLocVT().getStoreSize(), - inferAlignFromPtrInfo(MF, MPO)); + auto *MMO = MF.getMachineMemOperand(MPO, MachineMemOperand::MOStore, + VA.getLocVT().getStoreSize(), + inferAlignFromPtrInfo(MF, MPO)); MIRBuilder.buildStore(ExtReg, Addr, *MMO); } @@ -184,9 +184,9 @@ protected: } // end anonymous namespace -bool X86CallLowering::lowerReturn(MachineIRBuilder &MIRBuilder, - const Value *Val, ArrayRef<Register> VRegs, - FunctionLoweringInfo &FLI) const { +bool X86CallLowering::lowerReturn(MachineIRBuilder &MIRBuilder, + const Value *Val, ArrayRef<Register> VRegs, + FunctionLoweringInfo &FLI) const { assert(((Val && !VRegs.empty()) || (!Val && VRegs.empty())) && "Return value without a vreg"); auto MIB = MIRBuilder.buildInstrNoInsert(X86::RET).addImm(0); @@ -195,7 +195,7 @@ bool X86CallLowering::lowerReturn(MachineIRBuilder &MIRBuilder, MachineFunction &MF = MIRBuilder.getMF(); const Function &F = MF.getFunction(); MachineRegisterInfo &MRI = MF.getRegInfo(); - const DataLayout &DL = MF.getDataLayout(); + const DataLayout &DL = MF.getDataLayout(); LLVMContext &Ctx = Val->getType()->getContext(); const X86TargetLowering &TLI = *getTLI<X86TargetLowering>(); @@ -215,7 +215,7 @@ bool X86CallLowering::lowerReturn(MachineIRBuilder &MIRBuilder, return false; } - X86OutgoingValueHandler Handler(MIRBuilder, MRI, MIB, RetCC_X86); + X86OutgoingValueHandler Handler(MIRBuilder, MRI, MIB, RetCC_X86); if (!handleAssignments(MIRBuilder, SplitArgs, Handler)) return false; } @@ -226,10 +226,10 @@ bool X86CallLowering::lowerReturn(MachineIRBuilder &MIRBuilder, namespace { -struct X86IncomingValueHandler : public CallLowering::IncomingValueHandler { - X86IncomingValueHandler(MachineIRBuilder &MIRBuilder, - MachineRegisterInfo &MRI, CCAssignFn *AssignFn) - : IncomingValueHandler(MIRBuilder, MRI, AssignFn), +struct X86IncomingValueHandler : public CallLowering::IncomingValueHandler { + X86IncomingValueHandler(MachineIRBuilder &MIRBuilder, + MachineRegisterInfo &MRI, CCAssignFn *AssignFn) + : IncomingValueHandler(MIRBuilder, MRI, AssignFn), DL(MIRBuilder.getMF().getDataLayout()) {} Register getStackAddress(uint64_t Size, int64_t Offset, @@ -246,7 +246,7 @@ struct X86IncomingValueHandler : public CallLowering::IncomingValueHandler { void assignValueToAddress(Register ValVReg, Register Addr, uint64_t Size, MachinePointerInfo &MPO, CCValAssign &VA) override { MachineFunction &MF = MIRBuilder.getMF(); - auto *MMO = MF.getMachineMemOperand( + auto *MMO = MF.getMachineMemOperand( MPO, MachineMemOperand::MOLoad | MachineMemOperand::MOInvariant, Size, inferAlignFromPtrInfo(MF, MPO)); MIRBuilder.buildLoad(ValVReg, Addr, *MMO); @@ -296,10 +296,10 @@ protected: const DataLayout &DL; }; -struct FormalArgHandler : public X86IncomingValueHandler { +struct FormalArgHandler : public X86IncomingValueHandler { FormalArgHandler(MachineIRBuilder &MIRBuilder, MachineRegisterInfo &MRI, CCAssignFn *AssignFn) - : X86IncomingValueHandler(MIRBuilder, MRI, AssignFn) {} + : X86IncomingValueHandler(MIRBuilder, MRI, AssignFn) {} void markPhysRegUsed(unsigned PhysReg) override { MIRBuilder.getMRI()->addLiveIn(PhysReg); @@ -307,10 +307,10 @@ struct FormalArgHandler : public X86IncomingValueHandler { } }; -struct CallReturnHandler : public X86IncomingValueHandler { +struct CallReturnHandler : public X86IncomingValueHandler { CallReturnHandler(MachineIRBuilder &MIRBuilder, MachineRegisterInfo &MRI, CCAssignFn *AssignFn, MachineInstrBuilder &MIB) - : X86IncomingValueHandler(MIRBuilder, MRI, AssignFn), MIB(MIB) {} + : X86IncomingValueHandler(MIRBuilder, MRI, AssignFn), MIB(MIB) {} void markPhysRegUsed(unsigned PhysReg) override { MIB.addDef(PhysReg, RegState::Implicit); @@ -322,10 +322,10 @@ protected: } // end anonymous namespace -bool X86CallLowering::lowerFormalArguments(MachineIRBuilder &MIRBuilder, - const Function &F, - ArrayRef<ArrayRef<Register>> VRegs, - FunctionLoweringInfo &FLI) const { +bool X86CallLowering::lowerFormalArguments(MachineIRBuilder &MIRBuilder, + const Function &F, + ArrayRef<ArrayRef<Register>> VRegs, + FunctionLoweringInfo &FLI) const { if (F.arg_empty()) return true; @@ -339,7 +339,7 @@ bool X86CallLowering::lowerFormalArguments(MachineIRBuilder &MIRBuilder, SmallVector<ArgInfo, 8> SplitArgs; unsigned Idx = 0; - for (const auto &Arg : F.args()) { + for (const auto &Arg : F.args()) { // TODO: handle not simple cases. if (Arg.hasAttribute(Attribute::ByVal) || Arg.hasAttribute(Attribute::InReg) || @@ -378,10 +378,10 @@ bool X86CallLowering::lowerCall(MachineIRBuilder &MIRBuilder, MachineFunction &MF = MIRBuilder.getMF(); const Function &F = MF.getFunction(); MachineRegisterInfo &MRI = MF.getRegInfo(); - const DataLayout &DL = F.getParent()->getDataLayout(); + const DataLayout &DL = F.getParent()->getDataLayout(); const X86Subtarget &STI = MF.getSubtarget<X86Subtarget>(); const TargetInstrInfo &TII = *STI.getInstrInfo(); - const X86RegisterInfo *TRI = STI.getRegisterInfo(); + const X86RegisterInfo *TRI = STI.getRegisterInfo(); // Handle only Linux C, X86_64_SysV calling conventions for now. if (!STI.isTargetLinux() || !(Info.CallConv == CallingConv::C || @@ -419,7 +419,7 @@ bool X86CallLowering::lowerCall(MachineIRBuilder &MIRBuilder, return false; } // Do the actual argument marshalling. - X86OutgoingValueHandler Handler(MIRBuilder, MRI, MIB, CC_X86); + X86OutgoingValueHandler Handler(MIRBuilder, MRI, MIB, CC_X86); if (!handleAssignments(MIRBuilder, SplitArgs, Handler)) return false; |