10 #ifndef LLVM_LIB_TARGET_HEXAGON_RDFREGISTERS_H
11 #define LLVM_LIB_TARGET_HEXAGON_RDFREGISTERS_H
17 #include <unordered_map>
29 template <
typename T,
unsigned N = 32>
35 assert(Idx != 0 && !Map.empty() && Idx-1 < Map.size());
43 return F - Map.begin() + 1;
51 return F - Map.begin() + 1;
131 const TargetRegisterInfo &TRI;
132 IndexedSet<const uint32_t*> RegMasks;
133 std::vector<RegInfo> RegInfos;
134 std::vector<UnitInfo> UnitInfos;
135 std::vector<MaskInfo> MaskInfos;
137 bool aliasRR(RegisterRef RA, RegisterRef RB)
const;
138 bool aliasRM(RegisterRef RR, RegisterRef
RM)
const;
139 bool aliasMM(RegisterRef
RM, RegisterRef
RN)
const;
145 : Units(pri.getTRI().getNumRegUnits()), PRI(pri) {}
170 typedef std::map<RegisterId,LaneBitmask>
MapType;
173 MapType::iterator Pos;
188 return Index == I.Index;
191 return !(*
this ==
I);
raw_ostream & operator<<(raw_ostream &OS, const PrintLaneMaskOpt &P)
std::set< RegisterId > getAliasSet(RegisterId Reg) const
PrintLaneMaskOpt(LaneBitmask M)
const_iterator end() const
bool none() const
none - Returns true if none of the bits are set.
rr_iterator rr_end() const
bool operator==(const RegisterRef &RR) const
static LaneBitmask getAll()
RegisterId getRegMaskId(const uint32_t *RM) const
RegisterRef(RegisterId R, LaneBitmask M=LaneBitmask::getAll())
static int stackSlot2Index(unsigned Reg)
Compute the frame index from a register value representing a stack slot.
Reg
All possible values of the reg field in the ModR/M byte.
constexpr bool any() const
RegisterRef mapTo(RegisterRef RR, unsigned R) const
std::vector< T >::const_iterator const_iterator
RegisterRef makeRegRef() const
T get(uint32_t Idx) const
void print(raw_ostream &OS) const
uint32_t find(T Val) const
const_iterator begin() const
PhysicalRegisterInfo(const TargetRegisterInfo &tri, const MachineFunction &mf)
RegisterAggr & clear(RegisterRef RR)
const TargetRegisterInfo & getTRI() const
bool hasCoverOf(RegisterRef RR) const
static const unsigned End
bool operator!=(const RegisterRef &RR) const
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
const BitVector & getMaskUnits(RegisterId MaskId) const
RegisterRef intersectWith(RegisterRef RR) const
static bool isStackSlot(unsigned Reg)
isStackSlot - Sometimes it is useful the be able to store a non-negative frame index in a variable th...
RegisterAggr & insert(RegisterRef RR)
RegisterRef normalize(RegisterRef RR) const
auto find(R &&Range, const T &Val) -> decltype(std::begin(Range))
Provide wrappers to std::find which take ranges instead of having to pass begin/end explicitly...
RegisterAggr(const PhysicalRegisterInfo &pri)
bool operator!=(const rr_iterator &I) const
static LaneBitmask getNone()
bool alias(RegisterRef RA, RegisterRef RB) const
rr_iterator(const RegisterAggr &RG, bool End)
RegisterRef operator*() const
rr_iterator & operator++()
const uint32_t * getRegMaskBits(RegisterId R) const
RegisterRef getRefForUnit(uint32_t U) const
RegisterRef clearIn(RegisterRef RR) const
std::map< RegisterId, LaneBitmask > MapType
bool operator<(const RegisterRef &RR) const
rr_iterator rr_begin() const
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
static bool isRegMaskId(RegisterId R)
static bool isCoverOf(RegisterRef RA, RegisterRef RB, const PhysicalRegisterInfo &PRI)
std::underlying_type< E >::type Mask()
Get a bitmask with 1s in all places up to the high-order bit of E's largest value.
This class implements an extremely fast bulk output stream that can only output to a stream...
bool hasAliasOf(RegisterRef RR) const
bool operator==(const rr_iterator &I) const
static unsigned index2StackSlot(int FI)
Convert a non-negative frame index to a stack slot register value.
RegisterAggr & intersect(RegisterRef RR)