Deleted Added
full compact
RegisterClassInfo.h (256281) RegisterClassInfo.h (263508)
1//===-- RegisterClassInfo.h - Dynamic Register Class Info -*- C++ -*-------===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//

--- 48 unchanged lines hidden (view full) ---

57 const uint16_t *CalleeSaved;
58
59 // Map register number to CalleeSaved index + 1;
60 SmallVector<uint8_t, 4> CSRNum;
61
62 // Reserved registers in the current MF.
63 BitVector Reserved;
64
1//===-- RegisterClassInfo.h - Dynamic Register Class Info -*- C++ -*-------===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//

--- 48 unchanged lines hidden (view full) ---

57 const uint16_t *CalleeSaved;
58
59 // Map register number to CalleeSaved index + 1;
60 SmallVector<uint8_t, 4> CSRNum;
61
62 // Reserved registers in the current MF.
63 BitVector Reserved;
64
65 OwningArrayPtr<unsigned> PSetLimits;
66
65 // Compute all information about RC.
66 void compute(const TargetRegisterClass *RC) const;
67
68 // Return an up-to-date RCInfo for RC.
69 const RCInfo &get(const TargetRegisterClass *RC) const {
70 const RCInfo &RCI = RegClass[RC->getID()];
71 if (Tag != RCI.Tag)
72 compute(RC);

--- 48 unchanged lines hidden (view full) ---

121
122 /// Get the position of the last cost change in getOrder(RC).
123 ///
124 /// All registers in getOrder(RC).slice(getLastCostChange(RC)) will have the
125 /// same cost according to TRI->getCostPerUse().
126 unsigned getLastCostChange(const TargetRegisterClass *RC) {
127 return get(RC).LastCostChange;
128 }
67 // Compute all information about RC.
68 void compute(const TargetRegisterClass *RC) const;
69
70 // Return an up-to-date RCInfo for RC.
71 const RCInfo &get(const TargetRegisterClass *RC) const {
72 const RCInfo &RCI = RegClass[RC->getID()];
73 if (Tag != RCI.Tag)
74 compute(RC);

--- 48 unchanged lines hidden (view full) ---

123
124 /// Get the position of the last cost change in getOrder(RC).
125 ///
126 /// All registers in getOrder(RC).slice(getLastCostChange(RC)) will have the
127 /// same cost according to TRI->getCostPerUse().
128 unsigned getLastCostChange(const TargetRegisterClass *RC) {
129 return get(RC).LastCostChange;
130 }
131
132 /// Get the register unit limit for the given pressure set index.
133 ///
134 /// RegisterClassInfo adjusts this limit for reserved registers.
135 unsigned getRegPressureSetLimit(unsigned Idx) const {
136 if (!PSetLimits[Idx])
137 PSetLimits[Idx] = computePSetLimit(Idx);
138 return PSetLimits[Idx];
139 }
140
141protected:
142 unsigned computePSetLimit(unsigned Idx) const;
129};
130} // end namespace llvm
131
132#endif
143};
144} // end namespace llvm
145
146#endif
133