Lines Matching defs:MIRef
56 struct MIRef {
61 MIRef() = default;
62 MIRef(MachineBasicBlock *MBB) : MBB(MBB) {
67 MIRef(MachineInstr *MI)
70 MIRef(MachineInstr *MI, MachineBasicBlock *MBB)
73 MIRef(MachineInstr *MI, MachineBasicBlock *MBB, size_t Pos)
76 bool operator==(const MIRef &RHS) const {
79 bool operator!=(const MIRef &RHS) const { return !(*this == RHS); }
80 bool operator<(const MIRef &RHS) const {
81 // Comparison between different BBs happens when inserting a MIRef into set.
85 bool operator>(const MIRef &RHS) const {
86 // Comparison between different BBs happens when inserting a MIRef into set.
93 MIRef FirstAMX;
94 MIRef LastCall;
105 DenseMap<MachineBasicBlock *, SmallVector<MIRef, 8>> ShapeBBs;
148 bool hoistShapesInBB(MachineBasicBlock *MBB, SmallVectorImpl<MIRef> &Shapes) {
149 MIRef &FirstAMX = BBVisitedInfo[MBB].FirstAMX;
161 if (MO.isReg() && MIRef(MRI->getVRegDef(MO.getReg())) > FirstAMX)
169 Shapes.push_back(MIRef(&*--InsertPoint, MBB));
213 MIRef MIR(MI, MBB);
258 SmallSet<MIRef, 8> CfgNeedInsert;
272 BBVisitedInfo[&MBB].FirstAMX = MIRef(&MI, &MBB, Pos);
275 BBVisitedInfo[&MBB].LastCall = MIRef(&MI, &MBB, Pos);
280 CfgNeedInsert.insert(MIRef(&MBB));
299 CfgNeedInsert.insert(MIRef(Pred));
340 SmallSet<MIRef, 8> VisitedOrInserted;
346 SmallSet<MIRef, 8> InsertPoints;
347 SmallVector<MIRef, 8> WorkList({I});
349 MIRef I = WorkList.pop_back_val();
361 WorkList.push_back(MIRef(Succ));
367 for (MIRef I : InsertPoints) {