Home
last modified time | relevance | path

Searched refs:MIRBuilder (Results 1 – 25 of 33) sorted by relevance

12

/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/include/llvm/CodeGen/GlobalISel/
DIRTranslator.h207 bool translateBitCast(const User &U, MachineIRBuilder &MIRBuilder);
210 bool translateLoad(const User &U, MachineIRBuilder &MIRBuilder);
213 bool translateStore(const User &U, MachineIRBuilder &MIRBuilder);
216 bool translateMemFunc(const CallInst &CI, MachineIRBuilder &MIRBuilder,
219 void getStackGuard(Register DstReg, MachineIRBuilder &MIRBuilder);
222 MachineIRBuilder &MIRBuilder);
233 MachineIRBuilder &MIRBuilder);
236 MachineIRBuilder &MIRBuilder);
238 bool translateInlineAsm(const CallInst &CI, MachineIRBuilder &MIRBuilder);
248 MachineIRBuilder &MIRBuilder);
[all …]
DCallLowering.h113 ValueHandler(MachineIRBuilder &MIRBuilder, MachineRegisterInfo &MRI, in ValueHandler()
115 : MIRBuilder(MIRBuilder), MRI(MRI), AssignFn(AssignFn) {} in ValueHandler()
163 MachineIRBuilder &MIRBuilder; member
195 MachineIRBuilder &MIRBuilder) const;
203 MachineIRBuilder &MIRBuilder) const;
209 bool handleAssignments(MachineIRBuilder &MIRBuilder,
214 MachineIRBuilder &MIRBuilder,
264 virtual bool lowerReturn(MachineIRBuilder &MIRBuilder, const Value *Val, in lowerReturn() argument
269 return lowerReturn(MIRBuilder, Val, VRegs); in lowerReturn()
276 virtual bool lowerReturn(MachineIRBuilder &MIRBuilder, const Value *Val, in lowerReturn() argument
[all …]
DLegalizerHelper.h93 MachineIRBuilder &MIRBuilder; variable
254 createLibcall(MachineIRBuilder &MIRBuilder, RTLIB::Libcall Libcall,
259 LegalizerHelper::LegalizeResult createMemLibcall(MachineIRBuilder &MIRBuilder,
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/CodeGen/GlobalISel/
DLegalizerHelper.cpp69 : MIRBuilder(Builder), MRI(MF.getRegInfo()), in LegalizerHelper()
71 MIRBuilder.setMF(MF); in LegalizerHelper()
72 MIRBuilder.setChangeObserver(Observer); in LegalizerHelper()
78 : MIRBuilder(B), MRI(MF.getRegInfo()), LI(LI), Observer(Observer) { in LegalizerHelper()
79 MIRBuilder.setMF(MF); in LegalizerHelper()
80 MIRBuilder.setChangeObserver(Observer); in LegalizerHelper()
88 return LI.legalizeIntrinsic(MI, MRI, MIRBuilder) ? Legalized in legalizeInstrStep()
115 return LI.legalizeCustom(MI, MRI, MIRBuilder, Observer) ? Legalized in legalizeInstrStep()
127 MIRBuilder.buildUnmerge(VRegs, Reg); in extractParts()
145 MIRBuilder.buildUnmerge(VRegs, Reg); in extractParts()
[all …]
DIRTranslator.cpp289 MachineIRBuilder &MIRBuilder) { in translateBinaryOp() argument
303 MIRBuilder.buildInstr(Opcode, {Res}, {Op0, Op1}, Flags); in translateBinaryOp()
307 bool IRTranslator::translateFSub(const User &U, MachineIRBuilder &MIRBuilder) { in translateFSub() argument
319 MIRBuilder.buildInstr(TargetOpcode::G_FNEG, {Res}, {Op1}, Flags); in translateFSub()
322 return translateBinaryOp(TargetOpcode::G_FSUB, U, MIRBuilder); in translateFSub()
325 bool IRTranslator::translateFNeg(const User &U, MachineIRBuilder &MIRBuilder) { in translateFNeg() argument
333 MIRBuilder.buildInstr(TargetOpcode::G_FNEG, {Res}, {Op0}, Flags); in translateFNeg()
338 MachineIRBuilder &MIRBuilder) { in translateCompare() argument
347 MIRBuilder.buildICmp(Pred, Res, Op0, Op1); in translateCompare()
349 MIRBuilder.buildCopy( in translateCompare()
[all …]
DCallLowering.cpp32 bool CallLowering::lowerCall(MachineIRBuilder &MIRBuilder, ImmutableCallSite CS, in lowerCall() argument
68 isInTailCallPosition(CS, MIRBuilder.getMF().getTarget()) && in lowerCall()
69 (MIRBuilder.getMF() in lowerCall()
74 return lowerCall(MIRBuilder, Info); in lowerCall()
131 MachineIRBuilder &MIRBuilder) const { in packRegs()
134 const DataLayout &DL = MIRBuilder.getMF().getDataLayout(); in packRegs()
135 MachineRegisterInfo *MRI = MIRBuilder.getMRI(); in packRegs()
145 MIRBuilder.buildUndef(Dst); in packRegs()
148 MIRBuilder.buildInsert(NewDst, Dst, SrcRegs[i], Offsets[i]); in packRegs()
157 MachineIRBuilder &MIRBuilder) const { in unpackRegs()
[all …]
DLegalizer.cpp146 MachineIRBuilder &MIRBuilder) { in legalizeMachineFunction() argument
184 LegalizerHelper Helper(MF, LI, WrapperObserver, MIRBuilder); in legalizeMachineFunction()
185 LegalizationArtifactCombiner ArtCombiner(MIRBuilder, MRI, LI); in legalizeMachineFunction()
223 Helper.MIRBuilder.stopObservingChanges(); in legalizeMachineFunction()
237 Helper.MIRBuilder.stopObservingChanges(); in legalizeMachineFunction()
291 std::unique_ptr<MachineIRBuilder> MIRBuilder; in runOnMachineFunction() local
297 MIRBuilder = std::make_unique<CSEMIRBuilder>(); in runOnMachineFunction()
299 MIRBuilder->setCSEInfo(CSEInfo); in runOnMachineFunction()
301 MIRBuilder = std::make_unique<MachineIRBuilder>(); in runOnMachineFunction()
310 MFResult Result = legalizeMachineFunction(MF, LI, AuxObservers, *MIRBuilder); in runOnMachineFunction()
DRegBankSelect.cpp95 MIRBuilder.setMF(MF); in init()
164 MI = MIRBuilder.buildInstrNoInsert(TargetOpcode::COPY) in repairReg()
194 MIRBuilder.buildInstrNoInsert(MergeOp) in repairReg()
203 MIRBuilder.buildInstrNoInsert(TargetOpcode::G_UNMERGE_VALUES); in repairReg()
227 CurMI = MIRBuilder.getMF().CloneMachineInstr(MI); in repairReg()
684 MIRBuilder.setMBB(*MBB); in runOnMachineFunction()
709 MIRBuilder.setMBB(*MBB); in runOnMachineFunction()
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Target/X86/
DX86CallLowering.cpp99 OutgoingValueHandler(MachineIRBuilder &MIRBuilder, MachineRegisterInfo &MRI, in OutgoingValueHandler()
101 : ValueHandler(MIRBuilder, MRI, AssignFn), MIB(MIB), in OutgoingValueHandler()
102 DL(MIRBuilder.getMF().getDataLayout()), in OutgoingValueHandler()
103 STI(MIRBuilder.getMF().getSubtarget<X86Subtarget>()) {} in OutgoingValueHandler()
112 MIRBuilder.buildCopy(SPReg, STI.getRegisterInfo()->getStackRegister()); in getStackAddress()
115 MIRBuilder.buildConstant(OffsetReg, Offset); in getStackAddress()
118 MIRBuilder.buildPtrAdd(AddrReg, SPReg, OffsetReg); in getStackAddress()
120 MPO = MachinePointerInfo::getStack(MIRBuilder.getMF(), Offset); in getStackAddress()
141 auto MIB = MIRBuilder.buildAnyExt(LLT::scalar(PhysRegSize), ValVReg); in assignValueToReg()
146 MIRBuilder.buildCopy(PhysReg, ExtReg); in assignValueToReg()
[all …]
DX86CallLowering.h31 bool lowerReturn(MachineIRBuilder &MIRBuilder, const Value *Val,
34 bool lowerFormalArguments(MachineIRBuilder &MIRBuilder, const Function &F,
37 bool lowerCall(MachineIRBuilder &MIRBuilder,
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Target/ARM/
DARMCallLowering.cpp89 OutgoingValueHandler(MachineIRBuilder &MIRBuilder, MachineRegisterInfo &MRI, in OutgoingValueHandler()
91 : ValueHandler(MIRBuilder, MRI, AssignFn), MIB(MIB) {} in OutgoingValueHandler()
103 MIRBuilder.buildCopy(SPReg, Register(ARM::SP)); in getStackAddress()
106 MIRBuilder.buildConstant(OffsetReg, Offset); in getStackAddress()
109 MIRBuilder.buildPtrAdd(AddrReg, SPReg, OffsetReg); in getStackAddress()
111 MPO = MachinePointerInfo::getStack(MIRBuilder.getMF(), Offset); in getStackAddress()
124 MIRBuilder.buildCopy(PhysReg, ExtReg); in assignValueToReg()
134 auto MMO = MIRBuilder.getMF().getMachineMemOperand( in assignValueToAddress()
137 MIRBuilder.buildStore(ExtReg, Addr, *MMO); in assignValueToAddress()
160 MIRBuilder.buildUnmerge(NewRegs, Arg.Regs[0]); in assignCustomValue()
[all …]
DARMCallLowering.h35 bool lowerReturn(MachineIRBuilder &MIRBuilder, const Value *Val,
38 bool lowerFormalArguments(MachineIRBuilder &MIRBuilder, const Function &F,
41 bool lowerCall(MachineIRBuilder &MIRBuilder,
45 bool lowerReturnVal(MachineIRBuilder &MIRBuilder, const Value *Val,
DARMLegalizerInfo.cpp362 MachineIRBuilder &MIRBuilder, in legalizeCustom() argument
366 MIRBuilder.setInstr(MI); in legalizeCustom()
367 LLVMContext &Ctx = MIRBuilder.getMF().getFunction().getContext(); in legalizeCustom()
389 auto Status = createLibcall(MIRBuilder, Libcall, {RetRegs, RetTy}, in legalizeCustom()
411 MIRBuilder.buildConstant(OriginalResult, in legalizeCustom()
425 createLibcall(MIRBuilder, Libcall.LibcallID, {LibcallResult, RetTy}, in legalizeCustom()
444 MIRBuilder.buildTrunc(ProcessedResult, LibcallResult); in legalizeCustom()
449 MIRBuilder.buildConstant(Zero, 0); in legalizeCustom()
450 MIRBuilder.buildICmp(ResultPred, ProcessedResult, LibcallResult, Zero); in legalizeCustom()
457 MIRBuilder.buildOr(OriginalResult, Results[0], Results[1]); in legalizeCustom()
[all …]
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Target/AArch64/
DAArch64CallLowering.cpp56 IncomingArgHandler(MachineIRBuilder &MIRBuilder, MachineRegisterInfo &MRI, in IncomingArgHandler()
58 : ValueHandler(MIRBuilder, MRI, AssignFn), StackUsed(0) {} in IncomingArgHandler()
62 auto &MFI = MIRBuilder.getMF().getFrameInfo(); in getStackAddress()
64 MPO = MachinePointerInfo::getFixedStack(MIRBuilder.getMF(), FI); in getStackAddress()
66 MIRBuilder.buildFrameIndex(AddrReg, FI); in getStackAddress()
76 MIRBuilder.buildCopy(ValVReg, PhysReg); in assignValueToReg()
81 auto Copy = MIRBuilder.buildCopy(LLT{VA.getLocVT()}, PhysReg); in assignValueToReg()
82 MIRBuilder.buildTrunc(ValVReg, Copy); in assignValueToReg()
91 auto MMO = MIRBuilder.getMF().getMachineMemOperand( in assignValueToAddress()
94 MIRBuilder.buildLoad(ValVReg, Addr, *MMO); in assignValueToAddress()
[all …]
DAArch64LegalizerInfo.cpp622 MachineIRBuilder &MIRBuilder, in legalizeCustom() argument
629 return legalizeVaArg(MI, MRI, MIRBuilder); in legalizeCustom()
632 return legalizeLoadStore(MI, MRI, MIRBuilder, Observer); in legalizeCustom()
636 return legalizeShlAshrLshr(MI, MRI, MIRBuilder, Observer); in legalizeCustom()
644 MachineIRBuilder &MIRBuilder) const { in legalizeIntrinsic()
649 if (createMemLibcall(MIRBuilder, MRI, MI) == in legalizeIntrinsic()
661 MachineInstr &MI, MachineRegisterInfo &MRI, MachineIRBuilder &MIRBuilder, in legalizeShlAshrLshr() argument
678 MIRBuilder.setInstr(MI); in legalizeShlAshrLshr()
679 auto ExtCst = MIRBuilder.buildZExt(LLT::scalar(64), AmtReg); in legalizeShlAshrLshr()
685 MachineInstr &MI, MachineRegisterInfo &MRI, MachineIRBuilder &MIRBuilder, in legalizeLoadStore() argument
[all …]
DAArch64LegalizerInfo.h31 MachineIRBuilder &MIRBuilder,
35 MachineIRBuilder &MIRBuilder) const override;
39 MachineIRBuilder &MIRBuilder) const;
41 MachineIRBuilder &MIRBuilder,
44 MachineIRBuilder &MIRBuilder,
DAArch64CallLowering.h36 bool lowerReturn(MachineIRBuilder &MIRBuilder, const Value *Val,
40 bool lowerFormalArguments(MachineIRBuilder &MIRBuilder, const Function &F,
43 bool lowerCall(MachineIRBuilder &MIRBuilder,
48 isEligibleForTailCallOptimization(MachineIRBuilder &MIRBuilder,
67 bool lowerTailCall(MachineIRBuilder &MIRBuilder, CallLoweringInfo &Info,
DAArch64InstructionSelector.cpp102 MachineIRBuilder &MIRBuilder) const;
113 MachineIRBuilder &MIRBuilder) const;
136 MachineIRBuilder &MIRBuilder) const;
141 MachineIRBuilder &MIRBuilder) const;
144 MachineIRBuilder &MIRBuilder) const;
146 MachineIRBuilder &MIRBuilder) const;
148 MachineIRBuilder &MIRBuilder) const;
150 MachineIRBuilder &MIRBuilder) const;
154 MachineIRBuilder &MIRBuilder) const;
164 MachineIRBuilder &MIRBuilder) const;
[all …]
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Target/Mips/
DMipsLegalizerInfo.cpp261 MachineIRBuilder &MIRBuilder, in legalizeCustom() argument
266 MIRBuilder.setInstr(MI); in legalizeCustom()
268 static_cast<const MipsSubtarget &>(MIRBuilder.getMF().getSubtarget()); in legalizeCustom()
291 MachineInstrBuilder Bitcast = MIRBuilder.buildInstr( in legalizeCustom()
293 {Src, MIRBuilder.buildConstant(s32, UINT32_C(0x43300000))}); in legalizeCustom()
294 Bitcast.constrainAllUses(MIRBuilder.getTII(), *STI.getRegisterInfo(), in legalizeCustom()
297 MachineInstrBuilder TwoP52FP = MIRBuilder.buildFConstant( in legalizeCustom()
301 MIRBuilder.buildFSub(Dst, Bitcast, TwoP52FP); in legalizeCustom()
303 MachineInstrBuilder ResF64 = MIRBuilder.buildFSub(s64, Bitcast, TwoP52FP); in legalizeCustom()
304 MIRBuilder.buildFPTrunc(Dst, ResF64); in legalizeCustom()
[all …]
DMipsCallLowering.cpp51 if (!MIRBuilder.getMF().getDataLayout().isLittleEndian()) in setLeastSignificantFirst()
59 const Function &F = MIRBuilder.getMF().getFunction(); in handle()
62 MIRBuilder.getMF().getSubtarget().getTargetLowering()); in handle()
92 IncomingValueHandler(MachineIRBuilder &MIRBuilder, MachineRegisterInfo &MRI) in IncomingValueHandler() argument
93 : MipsHandler(MIRBuilder, MRI) {} in IncomingValueHandler()
109 MIRBuilder.getMRI()->addLiveIn(PhysReg); in markPhysRegUsed()
110 MIRBuilder.getMBB().addLiveIn(PhysReg); in markPhysRegUsed()
116 MIRBuilder.buildLoad(Val, Addr, *MMO); in buildLoad()
122 CallReturnHandler(MachineIRBuilder &MIRBuilder, MachineRegisterInfo &MRI, in CallReturnHandler() argument
124 : IncomingValueHandler(MIRBuilder, MRI), MIB(MIB) {} in CallReturnHandler()
[all …]
DMipsCallLowering.h28 MipsHandler(MachineIRBuilder &MIRBuilder, MachineRegisterInfo &MRI) in MipsHandler() argument
29 : MIRBuilder(MIRBuilder), MRI(MRI) {} in MipsHandler()
42 MachineIRBuilder &MIRBuilder; variable
65 bool lowerReturn(MachineIRBuilder &MIRBuilder, const Value *Val,
68 bool lowerFormalArguments(MachineIRBuilder &MIRBuilder, const Function &F,
71 bool lowerCall(MachineIRBuilder &MIRBuilder,
DMipsLegalizerInfo.h29 MachineIRBuilder &MIRBuilder,
33 MachineIRBuilder &MIRBuilder) const override;
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Target/RISCV/
DRISCVCallLowering.cpp24 bool RISCVCallLowering::lowerReturn(MachineIRBuilder &MIRBuilder, in lowerReturn() argument
28 MachineInstrBuilder Ret = MIRBuilder.buildInstrNoInsert(RISCV::PseudoRET); in lowerReturn()
33 MIRBuilder.insertInstr(Ret); in lowerReturn()
38 MachineIRBuilder &MIRBuilder, const Function &F, in lowerFormalArguments() argument
47 bool RISCVCallLowering::lowerCall(MachineIRBuilder &MIRBuilder, in lowerCall() argument
DRISCVCallLowering.h33 bool lowerFormalArguments(MachineIRBuilder &MIRBuilder, const Function &F,
36 bool lowerCall(MachineIRBuilder &MIRBuilder,
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Target/AMDGPU/
DAMDGPUCallLowering.cpp58 ExtReg = MIRBuilder.buildAnyExt(LLT::scalar(32), ValVReg).getReg(0); in assignValueToReg()
62 MIRBuilder.buildCopy(PhysReg, ExtReg); in assignValueToReg()
84 auto &MFI = MIRBuilder.getMF().getFrameInfo(); in getStackAddress()
86 MPO = MachinePointerInfo::getFixedStack(MIRBuilder.getMF(), FI); in getStackAddress()
89 MIRBuilder.buildFrameIndex(AddrReg, FI); in getStackAddress()
101 auto Copy = MIRBuilder.buildCopy(LLT::scalar(32), PhysReg); in assignValueToReg()
102 MIRBuilder.buildTrunc(ValVReg, Copy); in assignValueToReg()
110 auto Copy = MIRBuilder.buildCopy(LLT{VA.getLocVT()}, PhysReg); in assignValueToReg()
111 MIRBuilder.buildTrunc(ValVReg, Copy); in assignValueToReg()
115 MIRBuilder.buildCopy(ValVReg, PhysReg); in assignValueToReg()
[all …]

12