@@ -35,11 +35,11 @@ class MachineInstr;
3535class MachineRegisterInfo ;
3636class RegisterClassInfo ;
3737
38- struct VRegOrUnitMaskPair {
38+ struct VRegMaskOrUnitPair {
3939 Register RegUnit; // /< Virtual register or register unit.
4040 LaneBitmask LaneMask;
4141
42- VRegOrUnitMaskPair (Register RegUnit, LaneBitmask LaneMask)
42+ VRegMaskOrUnitPair (Register RegUnit, LaneBitmask LaneMask)
4343 : RegUnit(RegUnit), LaneMask(LaneMask) {}
4444};
4545
@@ -49,8 +49,8 @@ struct RegisterPressure {
4949 std::vector<unsigned > MaxSetPressure;
5050
5151 // / List of live in virtual registers or physical register units.
52- SmallVector<VRegOrUnitMaskPair , 8 > LiveInRegs;
53- SmallVector<VRegOrUnitMaskPair , 8 > LiveOutRegs;
52+ SmallVector<VRegMaskOrUnitPair , 8 > LiveInRegs;
53+ SmallVector<VRegMaskOrUnitPair , 8 > LiveOutRegs;
5454
5555 void dump (const TargetRegisterInfo *TRI) const ;
5656};
@@ -166,13 +166,13 @@ class PressureDiff {
166166class RegisterOperands {
167167public:
168168 // / List of virtual registers and register units read by the instruction.
169- SmallVector<VRegOrUnitMaskPair , 8 > Uses;
169+ SmallVector<VRegMaskOrUnitPair , 8 > Uses;
170170 // / List of virtual registers and register units defined by the
171171 // / instruction which are not dead.
172- SmallVector<VRegOrUnitMaskPair , 8 > Defs;
172+ SmallVector<VRegMaskOrUnitPair , 8 > Defs;
173173 // / List of virtual registers and register units defined by the
174174 // / instruction but dead.
175- SmallVector<VRegOrUnitMaskPair , 8 > DeadDefs;
175+ SmallVector<VRegMaskOrUnitPair , 8 > DeadDefs;
176176
177177 // / Analyze the given instruction \p MI and fill in the Uses, Defs and
178178 // / DeadDefs list based on the MachineOperand flags.
@@ -185,7 +185,7 @@ class RegisterOperands {
185185 void detectDeadDefs (const MachineInstr &MI, const LiveIntervals &LIS);
186186
187187 // / Use liveness information to find out which uses/defs are partially
188- // / undefined/dead and adjust the VRegOrUnitMaskPairs accordingly.
188+ // / undefined/dead and adjust the VRegMaskOrUnitPairs accordingly.
189189 // / If \p AddFlagsMI is given then missing read-undef and dead flags will be
190190 // / added to the instruction.
191191 void adjustLaneLiveness (const LiveIntervals &LIS,
@@ -303,7 +303,7 @@ class LiveRegSet {
303303
304304 // / Mark the \p Pair.LaneMask lanes of \p Pair.Reg as live.
305305 // / Returns the previously live lanes of \p Pair.Reg.
306- LaneBitmask insert (VRegOrUnitMaskPair Pair) {
306+ LaneBitmask insert (VRegMaskOrUnitPair Pair) {
307307 unsigned SparseIndex = getSparseIndexFromReg (Pair.RegUnit );
308308 auto InsertRes = Regs.insert (IndexMaskPair (SparseIndex, Pair.LaneMask ));
309309 if (!InsertRes.second ) {
@@ -316,7 +316,7 @@ class LiveRegSet {
316316
317317 // / Clears the \p Pair.LaneMask lanes of \p Pair.Reg (mark them as dead).
318318 // / Returns the previously live lanes of \p Pair.Reg.
319- LaneBitmask erase (VRegOrUnitMaskPair Pair) {
319+ LaneBitmask erase (VRegMaskOrUnitPair Pair) {
320320 unsigned SparseIndex = getSparseIndexFromReg (Pair.RegUnit );
321321 RegSet::iterator I = Regs.find (SparseIndex);
322322 if (I == Regs.end ())
@@ -330,7 +330,7 @@ class LiveRegSet {
330330 return Regs.size ();
331331 }
332332
333- void appendTo (SmallVectorImpl<VRegOrUnitMaskPair > &To) const {
333+ void appendTo (SmallVectorImpl<VRegMaskOrUnitPair > &To) const {
334334 for (const IndexMaskPair &P : Regs) {
335335 Register Reg = getRegFromSparseIndex (P.Index );
336336 if (P.LaneMask .any ())
@@ -408,7 +408,7 @@ class RegPressureTracker {
408408 // / Force liveness of virtual registers or physical register
409409 // / units. Particularly useful to initialize the livein/out state of the
410410 // / tracker before the first call to advance/recede.
411- void addLiveRegs (ArrayRef<VRegOrUnitMaskPair > Regs);
411+ void addLiveRegs (ArrayRef<VRegMaskOrUnitPair > Regs);
412412
413413 // / Get the MI position corresponding to this register pressure.
414414 MachineBasicBlock::const_iterator getPos () const { return CurrPos; }
@@ -420,14 +420,14 @@ class RegPressureTracker {
420420 void setPos (MachineBasicBlock::const_iterator Pos) { CurrPos = Pos; }
421421
422422 // / Recede across the previous instruction.
423- void recede (SmallVectorImpl<VRegOrUnitMaskPair > *LiveUses = nullptr );
423+ void recede (SmallVectorImpl<VRegMaskOrUnitPair > *LiveUses = nullptr );
424424
425425 // / Recede across the previous instruction.
426426 // / This "low-level" variant assumes that recedeSkipDebugValues() was
427427 // / called previously and takes precomputed RegisterOperands for the
428428 // / instruction.
429429 void recede (const RegisterOperands &RegOpers,
430- SmallVectorImpl<VRegOrUnitMaskPair > *LiveUses = nullptr );
430+ SmallVectorImpl<VRegMaskOrUnitPair > *LiveUses = nullptr );
431431
432432 // / Recede until we find an instruction which is not a DebugValue.
433433 void recedeSkipDebugValues ();
@@ -545,21 +545,21 @@ class RegPressureTracker {
545545
546546protected:
547547 // / Add Reg to the live out set and increase max pressure.
548- void discoverLiveOut (VRegOrUnitMaskPair Pair);
548+ void discoverLiveOut (VRegMaskOrUnitPair Pair);
549549 // / Add Reg to the live in set and increase max pressure.
550- void discoverLiveIn (VRegOrUnitMaskPair Pair);
550+ void discoverLiveIn (VRegMaskOrUnitPair Pair);
551551
552552 // / Get the SlotIndex for the first nondebug instruction including or
553553 // / after the current position.
554554 SlotIndex getCurrSlot () const ;
555555
556- void bumpDeadDefs (ArrayRef<VRegOrUnitMaskPair > DeadDefs);
556+ void bumpDeadDefs (ArrayRef<VRegMaskOrUnitPair > DeadDefs);
557557
558558 void bumpUpwardPressure (const MachineInstr *MI);
559559 void bumpDownwardPressure (const MachineInstr *MI);
560560
561- void discoverLiveInOrOut (VRegOrUnitMaskPair Pair,
562- SmallVectorImpl<VRegOrUnitMaskPair > &LiveInOrOut);
561+ void discoverLiveInOrOut (VRegMaskOrUnitPair Pair,
562+ SmallVectorImpl<VRegMaskOrUnitPair > &LiveInOrOut);
563563
564564 LaneBitmask getLastUsedLanes (Register RegUnit, SlotIndex Pos) const ;
565565 LaneBitmask getLiveLanesAt (Register RegUnit, SlotIndex Pos) const ;
0 commit comments