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;
171 bool hoistShapesInBB(MachineBasicBlock *MBB, SmallVectorImpl<MIRef> &Shapes) {
172 MIRef &FirstAMX = BBVisitedInfo[MBB].FirstAMX;
184 if (MO.isReg() && MIRef(MRI->getVRegDef(MO.getReg())) > FirstAMX)
192 Shapes.push_back(MIRef(&*--InsertPoint, MBB));
236 MIRef MIR(MI, MBB);
291 SmallSet<MIRef, 8> CfgNeedInsert;
305 BBVisitedInfo[&MBB].FirstAMX = MIRef(&MI, &MBB, Pos);
308 BBVisitedInfo[&MBB].LastCall = MIRef(&MI, &MBB, Pos);
313 CfgNeedInsert.insert(MIRef(&MBB));
332 CfgNeedInsert.insert(MIRef(Pred));
373 SmallSet<MIRef, 8> VisitedOrInserted;
379 SmallSet<MIRef, 8> InsertPoints;
380 SmallVector<MIRef, 8> WorkList({I});
382 MIRef I = WorkList.pop_back_val();
394 WorkList.push_back(MIRef(Succ));
400 for (MIRef I : InsertPoints) {