Lines Matching refs:MachineOperand
27 MachineOperand *OpToFold;
33 MachineOperand::MachineOperandType Kind;
36 FoldCandidate(MachineInstr *MI, unsigned OpNo, MachineOperand *FoldOp, in FoldCandidate()
53 return Kind == MachineOperand::MO_FrameIndex; in isFI()
57 return Kind == MachineOperand::MO_Immediate; in isImm()
61 return Kind == MachineOperand::MO_Register; in isReg()
64 bool isGlobal() const { return Kind == MachineOperand::MO_GlobalAddress; } in isGlobal()
79 const MachineOperand &OpToFold) const;
89 MachineOperand *OpToFold) const;
91 const MachineOperand &UseMO) const;
93 getRegSeqInit(SmallVectorImpl<std::pair<MachineOperand *, unsigned>> &Defs,
95 bool tryToFoldACImm(const MachineOperand &OpToFold, MachineInstr *UseMI,
98 void foldOperand(MachineOperand &OpToFold,
104 MachineOperand *getImmOrMaterializedImm(MachineOperand &Op) const;
108 bool foldInstOperand(MachineInstr &MI, MachineOperand &OpToFold) const;
110 MachineOperand *&CurrentKnownM0Val) const;
112 const MachineOperand *isClamp(const MachineInstr &MI) const;
115 std::pair<const MachineOperand *, int> isOMod(const MachineInstr &MI) const;
149 const MachineOperand &MO) { in getRegOpRC()
181 const MachineOperand &OpToFold) const { in frameIndexMayFold()
205 MachineOperand &Old = MI->getOperand(Fold.UseOpNo); in canUseImmWithOpSel()
235 MachineOperand &Old = MI->getOperand(Fold.UseOpNo); in tryFoldImmWithOpSel()
264 MachineOperand &Mod = MI->getOperand(ModIdx); in tryFoldImmWithOpSel()
359 MachineOperand &Old = MI->getOperand(Fold.UseOpNo); in updateOperand()
368 MachineOperand New = MachineOperand::CreateImm(Fold.ImmToFold); in updateOperand()
385 MachineOperand &Dst0 = MI->getOperand(0); in updateOperand()
386 MachineOperand &Dst1 = MI->getOperand(1); in updateOperand()
443 MachineOperand *New = Fold.OpToFold; in updateOperand()
456 MachineOperand *FoldOp, bool Commuted = false, in appendFoldCandidate()
469 MachineOperand *OpToFold) const { in tryAddToFoldList()
488 MachineOperand &Op1 = MI->getOperand(1); in tryAddToFoldList()
489 MachineOperand &Op2 = MI->getOperand(2); in tryAddToFoldList()
522 MI->addOperand(MachineOperand::CreateImm(0)); in tryAddToFoldList()
588 MachineOperand &OtherOp = MI->getOperand(OpNo); in tryAddToFoldList()
609 MachineOperand &OpImm = MI->getOperand(ImmIdx); in tryAddToFoldList()
649 const MachineOperand &UseMO) const { in isUseSafeToFold()
658 SmallVectorImpl<std::pair<MachineOperand *, unsigned>> &Defs, in getRegSeqInit() argument
665 MachineOperand *Sub = &Def->getOperand(I); in getRegSeqInit()
672 MachineOperand *Op = &SubDef->getOperand(1); in getRegSeqInit()
690 const MachineOperand &OpToFold, MachineInstr *UseMI, unsigned UseOpIdx, in tryToFoldACImm()
718 MachineOperand &UseOp = UseMI->getOperand(UseOpIdx); in tryToFoldACImm()
720 MachineOperand &DefOp = Def->getOperand(1); in tryToFoldACImm()
728 SmallVector<std::pair<MachineOperand*, unsigned>, 32> Defs; in tryToFoldACImm()
734 const MachineOperand *Op = Defs[I].first; in tryToFoldACImm()
756 MachineOperand &OpToFold, in foldOperand()
761 const MachineOperand *UseOp = &UseMI->getOperand(UseOpIdx); in foldOperand()
779 SmallVector<MachineOperand *, 4> UsesToProcess; in foldOperand()
812 MachineOperand &SOff = in foldOperand()
878 MachineOperand NewSrcOp(SrcOp); in foldOperand()
881 UseMI->addOperand(*MF, MachineOperand::CreateImm(0)); // src0_modifiers in foldOperand()
883 UseMI->addOperand(*MF, MachineOperand::CreateImm(0)); // op_sel in foldOperand()
908 SmallVector<std::pair<MachineOperand*, unsigned>, 32> Defs; in foldOperand()
922 MachineOperand *Def = Defs[I].first; in foldOperand()
1097 MachineOperand ImmOp = MachineOperand::CreateImm(Imm.getSExtValue()); in foldOperand()
1189 MachineOperand *
1190 SIFoldOperands::getImmOrMaterializedImm(MachineOperand &Op) const { in getImmOrMaterializedImm()
1198 MachineOperand &ImmSrc = Def->getOperand(1); in getImmOrMaterializedImm()
1218 MachineOperand *Src0 = getImmOrMaterializedImm(MI->getOperand(Src0Idx)); in tryConstantFoldOp()
1231 MachineOperand *Src1 = getImmOrMaterializedImm(MI->getOperand(Src1Idx)); in tryConstantFoldOp()
1316 MachineOperand *Src0 = TII->getNamedOperand(MI, AMDGPU::OpName::src0); in tryFoldCndMask()
1317 MachineOperand *Src1 = TII->getNamedOperand(MI, AMDGPU::OpName::src1); in tryFoldCndMask()
1354 MachineOperand *Src0 = getImmOrMaterializedImm(MI.getOperand(1)); in tryFoldZeroHighBits()
1372 MachineOperand &OpToFold) const { in foldInstOperand()
1378 MachineOperand &Dst = MI.getOperand(0); in foldInstOperand()
1399 SmallVector<MachineOperand *, 4> UsesToProcess; in foldInstOperand()
1446 MachineInstr &MI, MachineOperand *&CurrentKnownM0Val) const { in tryFoldFoldableCopy()
1450 MachineOperand &NewM0Val = MI.getOperand(1); in tryFoldFoldableCopy()
1463 MachineOperand &OpToFold = MI.getOperand(1); in tryFoldFoldableCopy()
1514 const MachineOperand *SIFoldOperands::isClamp(const MachineInstr &MI) const { in isClamp()
1531 const MachineOperand *Src0 = TII->getNamedOperand(MI, AMDGPU::OpName::src0); in isClamp()
1532 const MachineOperand *Src1 = TII->getNamedOperand(MI, AMDGPU::OpName::src1); in isClamp()
1563 const MachineOperand *ClampSrc = isClamp(MI); in tryFoldClamp()
1576 MachineOperand *DefClamp = TII->getNamedOperand(*Def, AMDGPU::OpName::clamp); in tryFoldClamp()
1656 std::pair<const MachineOperand *, int>
1677 const MachineOperand *RegOp = nullptr; in isOMod()
1678 const MachineOperand *ImmOp = nullptr; in isOMod()
1679 const MachineOperand *Src0 = TII->getNamedOperand(MI, AMDGPU::OpName::src0); in isOMod()
1680 const MachineOperand *Src1 = TII->getNamedOperand(MI, AMDGPU::OpName::src1); in isOMod()
1716 const MachineOperand *Src0 = TII->getNamedOperand(MI, AMDGPU::OpName::src0); in isOMod()
1717 const MachineOperand *Src1 = TII->getNamedOperand(MI, AMDGPU::OpName::src1); in isOMod()
1736 const MachineOperand *RegOp; in tryFoldOMod()
1745 MachineOperand *DefOMod = TII->getNamedOperand(*Def, AMDGPU::OpName::omod); in tryFoldOMod()
1782 SmallVector<std::pair<MachineOperand*, unsigned>, 32> Defs; in tryFoldRegSequence()
1799 MachineOperand *Op = &*MRI->use_nodbg_begin(Reg); in tryFoldRegSequence()
1859 const MachineOperand &CopySrc = Copy.getOperand(1); in isAGPRCopy()
1879 const MachineOperand &OtherCopySrc = CopySrcDef->getOperand(1); in isAGPRCopy()
1932 MachineOperand &MO = PHI.getOperand(K); in tryFoldPhiAGPR()
1959 MachineOperand &MO = PHI.getOperand(K); in tryFoldPhiAGPR()
1986 MachineOperand &CopyIn = Def->getOperand(1); in tryFoldPhiAGPR()
2030 MachineOperand &Def = MI.getOperand(0); in tryFoldLoad()
2119 DenseMap<std::pair<Register, unsigned>, std::vector<MachineOperand *>> in tryOptimizeAGPRPhis()
2130 MachineOperand &PhiMO = MI.getOperand(K); in tryOptimizeAGPRPhis()
2165 for (MachineOperand *MO : MOs) { in tryOptimizeAGPRPhis()
2196 MachineOperand *CurrentKnownM0Val = nullptr; in runOnMachineFunction()