Lines Matching refs:MIRBuilder
99 X86OutgoingValueHandler(MachineIRBuilder &MIRBuilder, in X86OutgoingValueHandler()
102 : IncomingValueHandler(MIRBuilder, MRI, AssignFn), MIB(MIB), in X86OutgoingValueHandler()
103 DL(MIRBuilder.getMF().getDataLayout()), in X86OutgoingValueHandler()
104 STI(MIRBuilder.getMF().getSubtarget<X86Subtarget>()) {} in X86OutgoingValueHandler()
111 MIRBuilder.buildCopy(p0, STI.getRegisterInfo()->getStackRegister()); in getStackAddress()
113 auto OffsetReg = MIRBuilder.buildConstant(SType, Offset); in getStackAddress()
115 auto AddrReg = MIRBuilder.buildPtrAdd(p0, SPReg, OffsetReg); in getStackAddress()
117 MPO = MachinePointerInfo::getStack(MIRBuilder.getMF(), Offset); in getStackAddress()
140 MIRBuilder.buildAnyExt(LLT::scalar(PhysRegSize), ValVReg).getReg(0); in assignValueToReg()
144 MIRBuilder.buildCopy(PhysReg, ExtReg); in assignValueToReg()
149 MachineFunction &MF = MIRBuilder.getMF(); in assignValueToAddress()
155 MIRBuilder.buildStore(ExtReg, Addr, *MMO); in assignValueToAddress()
188 MachineIRBuilder &MIRBuilder, const Value *Val, in lowerReturn() argument
192 auto MIB = MIRBuilder.buildInstrNoInsert(X86::RET).addImm(0); in lowerReturn()
195 MachineFunction &MF = MIRBuilder.getMF(); in lowerReturn()
213 MIRBuilder.buildUnmerge(Regs, VRegs[i]); in lowerReturn()
218 X86OutgoingValueHandler Handler(MIRBuilder, MRI, MIB, RetCC_X86); in lowerReturn()
219 if (!handleAssignments(MIRBuilder, SplitArgs, Handler)) in lowerReturn()
223 MIRBuilder.insertInstr(MIB); in lowerReturn()
230 X86IncomingValueHandler(MachineIRBuilder &MIRBuilder, in X86IncomingValueHandler()
232 : IncomingValueHandler(MIRBuilder, MRI, AssignFn), in X86IncomingValueHandler()
233 DL(MIRBuilder.getMF().getDataLayout()) {} in X86IncomingValueHandler()
237 auto &MFI = MIRBuilder.getMF().getFrameInfo(); in getStackAddress()
239 MPO = MachinePointerInfo::getFixedStack(MIRBuilder.getMF(), FI); in getStackAddress()
241 return MIRBuilder in getStackAddress()
248 MachineFunction &MF = MIRBuilder.getMF(); in assignValueToAddress()
252 MIRBuilder.buildLoad(ValVReg, Addr, *MMO); in assignValueToAddress()
272 auto Copy = MIRBuilder.buildCopy(LLT::scalar(PhysRegSize), PhysReg); in assignValueToReg()
273 MIRBuilder.buildTrunc(ValVReg, Copy); in assignValueToReg()
277 MIRBuilder.buildCopy(ValVReg, PhysReg); in assignValueToReg()
283 auto Copy = MIRBuilder.buildCopy(LLT{VA.getLocVT()}, PhysReg); in assignValueToReg()
284 MIRBuilder.buildTrunc(ValVReg, Copy); in assignValueToReg()
300 FormalArgHandler(MachineIRBuilder &MIRBuilder, MachineRegisterInfo &MRI, in FormalArgHandler()
302 : X86IncomingValueHandler(MIRBuilder, MRI, AssignFn) {} in FormalArgHandler()
305 MIRBuilder.getMRI()->addLiveIn(PhysReg); in markPhysRegUsed()
306 MIRBuilder.getMBB().addLiveIn(PhysReg); in markPhysRegUsed()
311 CallReturnHandler(MachineIRBuilder &MIRBuilder, MachineRegisterInfo &MRI, in CallReturnHandler()
313 : X86IncomingValueHandler(MIRBuilder, MRI, AssignFn), MIB(MIB) {} in CallReturnHandler()
326 MachineIRBuilder &MIRBuilder, const Function &F, in lowerFormalArguments() argument
335 MachineFunction &MF = MIRBuilder.getMF(); in lowerFormalArguments()
355 MIRBuilder.buildMerge(VRegs[Idx][0], Regs); in lowerFormalArguments()
361 MachineBasicBlock &MBB = MIRBuilder.getMBB(); in lowerFormalArguments()
363 MIRBuilder.setInstr(*MBB.begin()); in lowerFormalArguments()
365 FormalArgHandler Handler(MIRBuilder, MRI, CC_X86); in lowerFormalArguments()
366 if (!handleAssignments(MIRBuilder, SplitArgs, Handler)) in lowerFormalArguments()
370 MIRBuilder.setMBB(MBB); in lowerFormalArguments()
375 bool X86CallLowering::lowerCall(MachineIRBuilder &MIRBuilder, in lowerCall() argument
377 MachineFunction &MF = MIRBuilder.getMF(); in lowerCall()
391 auto CallSeqStart = MIRBuilder.buildInstr(AdjStackDown); in lowerCall()
400 auto MIB = MIRBuilder.buildInstrNoInsert(CallOpc) in lowerCall()
416 MIRBuilder.buildUnmerge(Regs, OrigArg.Regs[0]); in lowerCall()
421 X86OutgoingValueHandler Handler(MIRBuilder, MRI, MIB, CC_X86); in lowerCall()
422 if (!handleAssignments(MIRBuilder, SplitArgs, Handler)) in lowerCall()
435 MIRBuilder.buildInstr(X86::MOV8ri) in lowerCall()
442 MIRBuilder.insertInstr(MIB); in lowerCall()
470 CallReturnHandler Handler(MIRBuilder, MRI, RetCC_X86, MIB); in lowerCall()
471 if (!handleAssignments(MIRBuilder, SplitArgs, Handler)) in lowerCall()
475 MIRBuilder.buildMerge(Info.OrigRet.Regs[0], NewRegs); in lowerCall()
483 MIRBuilder.buildInstr(AdjStackUp) in lowerCall()