• Home
  • Raw
  • Download

Lines Matching refs:MIRBuilder

51   if (!MIRBuilder.getMF().getDataLayout().isLittleEndian())  in setLeastSignificantFirst()
59 const Function &F = MIRBuilder.getMF().getFunction(); in handle()
62 MIRBuilder.getMF().getSubtarget().getTargetLowering()); in handle()
92 MipsIncomingValueHandler(MachineIRBuilder &MIRBuilder, in MipsIncomingValueHandler() argument
94 : MipsHandler(MIRBuilder, MRI) {} in MipsIncomingValueHandler()
110 MIRBuilder.getMRI()->addLiveIn(PhysReg); in markPhysRegUsed()
111 MIRBuilder.getMBB().addLiveIn(PhysReg); in markPhysRegUsed()
117 return MIRBuilder.buildLoad(Res, Addr, *MMO); in buildLoad()
123 CallReturnHandler(MachineIRBuilder &MIRBuilder, MachineRegisterInfo &MRI, in CallReturnHandler() argument
125 : MipsIncomingValueHandler(MIRBuilder, MRI), MIB(MIB) {} in CallReturnHandler()
143 static_cast<const MipsSubtarget &>(MIRBuilder.getMF().getSubtarget()); in assignValueToReg()
146 auto Lo = MIRBuilder.buildCopy(s32, Register(PhysReg + (IsEL ? 0 : 1))); in assignValueToReg()
147 auto Hi = MIRBuilder.buildCopy(s32, Register(PhysReg + (IsEL ? 1 : 0))); in assignValueToReg()
148 MIRBuilder.buildMerge(ValVReg, {Lo, Hi}); in assignValueToReg()
152 MIRBuilder.buildCopy(ValVReg, PhysReg); in assignValueToReg()
159 auto Copy = MIRBuilder.buildCopy(LLT{VA.getLocVT()}, PhysReg); in assignValueToReg()
160 MIRBuilder.buildTrunc(ValVReg, Copy); in assignValueToReg()
164 MIRBuilder.buildCopy(ValVReg, PhysReg); in assignValueToReg()
173 MachineFunction &MF = MIRBuilder.getMF(); in getStackAddress()
180 MachinePointerInfo::getFixedStack(MIRBuilder.getMF(), FI); in getStackAddress()
187 return MIRBuilder.buildFrameIndex(LLT::pointer(0, 32), FI).getReg(0); in getStackAddress()
196 MIRBuilder.buildTrunc(ValVReg, Load); in assignValueToAddress()
208 MIRBuilder.buildMerge(ArgsReg, VRegs); in handleSplit()
215 MipsOutgoingValueHandler(MachineIRBuilder &MIRBuilder, in MipsOutgoingValueHandler() argument
217 : MipsHandler(MIRBuilder, MRI), MIB(MIB) {} in MipsOutgoingValueHandler()
244 static_cast<const MipsSubtarget &>(MIRBuilder.getMF().getSubtarget()); in assignValueToReg()
246 auto Unmerge = MIRBuilder.buildUnmerge(LLT::scalar(32), ValVReg); in assignValueToReg()
247 MIRBuilder.buildCopy(Register(PhysReg + (IsEL ? 0 : 1)), Unmerge.getReg(0)); in assignValueToReg()
248 MIRBuilder.buildCopy(Register(PhysReg + (IsEL ? 1 : 0)), Unmerge.getReg(1)); in assignValueToReg()
250 MIRBuilder.buildCopy(PhysReg, ValVReg); in assignValueToReg()
253 MIRBuilder.buildCopy(PhysReg, ExtReg); in assignValueToReg()
260 MachineFunction &MF = MIRBuilder.getMF(); in getStackAddress()
265 auto SPReg = MIRBuilder.buildCopy(p0, Register(Mips::SP)); in getStackAddress()
268 auto OffsetReg = MIRBuilder.buildConstant(s32, Offset); in getStackAddress()
270 auto AddrReg = MIRBuilder.buildPtrAdd(p0, SPReg, OffsetReg); in getStackAddress()
273 MachinePointerInfo::getStack(MIRBuilder.getMF(), Offset); in getStackAddress()
287 MIRBuilder.buildStore(ExtReg, Addr, *MMO); in assignValueToAddress()
295 return MIRBuilder.buildSExt(LocTy, ValReg).getReg(0); in extendRegister()
298 return MIRBuilder.buildZExt(LocTy, ValReg).getReg(0); in extendRegister()
301 return MIRBuilder.buildAnyExt(LocTy, ValReg).getReg(0); in extendRegister()
316 MIRBuilder.buildUnmerge(VRegs, ArgsReg); in handleSplit()
376 bool MipsCallLowering::lowerReturn(MachineIRBuilder &MIRBuilder, in lowerReturn() argument
380 MachineInstrBuilder Ret = MIRBuilder.buildInstrNoInsert(Mips::RetRA); in lowerReturn()
386 MachineFunction &MF = MIRBuilder.getMF(); in lowerReturn()
407 MipsOutgoingValueHandler RetHandler(MIRBuilder, MF.getRegInfo(), Ret); in lowerReturn()
412 MIRBuilder.insertInstr(Ret); in lowerReturn()
417 MachineIRBuilder &MIRBuilder, const Function &F, in lowerFormalArguments() argument
429 MachineFunction &MF = MIRBuilder.getMF(); in lowerFormalArguments()
459 MipsIncomingValueHandler Handler(MIRBuilder, MF.getRegInfo()); in lowerFormalArguments()
482 MIRBuilder.getMBB().addLiveIn(ArgRegs[I]); in lowerFormalArguments()
485 MIRBuilder.buildCopy(LLT::scalar(RegSize * 8), Register(ArgRegs[I])); in lowerFormalArguments()
489 MIRBuilder.buildFrameIndex(LLT::pointer(MPO.getAddrSpace(), 32), FI); in lowerFormalArguments()
492 MIRBuilder.buildStore(Copy, FrameIndex, *MMO); in lowerFormalArguments()
499 bool MipsCallLowering::lowerCall(MachineIRBuilder &MIRBuilder, in lowerCall() argument
517 MachineFunction &MF = MIRBuilder.getMF(); in lowerCall()
526 MIRBuilder.buildInstr(Mips::ADJCALLSTACKDOWN); in lowerCall()
531 MachineInstrBuilder MIB = MIRBuilder.buildInstrNoInsert( in lowerCall()
538 MIRBuilder.buildGlobalValue(CalleeReg, Info.Callee.getGlobal()); in lowerCall()
583 MipsOutgoingValueHandler RetHandler(MIRBuilder, MF.getRegInfo(), MIB); in lowerCall()
595 MIRBuilder.buildCopy( in lowerCall()
600 MIRBuilder.insertInstr(MIB); in lowerCall()
603 static_cast<const MipsSubtarget &>(MIRBuilder.getMF().getSubtarget()); in lowerCall()
604 MIB.constrainAllUses(MIRBuilder.getTII(), *STI.getRegisterInfo(), in lowerCall()
625 CallReturnHandler Handler(MIRBuilder, MF.getRegInfo(), MIB); in lowerCall()
630 MIRBuilder.buildInstr(Mips::ADJCALLSTACKUP).addImm(NextStackOffset).addImm(0); in lowerCall()