Lines Matching defs:LocIdx

81 class LocIdx {
86 LocIdx() : Location(UINT_MAX) {}
90 LocIdx(unsigned L) : Location(L) {
94 static LocIdx MakeIllegalLoc() { return LocIdx(); }
95 static LocIdx MakeTombstoneLoc() {
96 LocIdx L = LocIdx();
107 bool operator==(const LocIdx &L) const { return Location == L.Location; }
111 bool operator!=(const LocIdx &L) const { return !(*this == L); }
113 bool operator<(const LocIdx &Other) const {
168 ValueIDNum(uint64_t Block, uint64_t Inst, LocIdx Loc) {
216 template <> struct DenseMapInfo<LocIdx> {
217 static inline LocIdx getEmptyKey() { return LocIdx::MakeIllegalLoc(); }
218 static inline LocIdx getTombstoneKey() { return LocIdx::MakeTombstoneLoc(); }
220 static unsigned getHashValue(const LocIdx &Loc) { return Loc.asU64(); }
222 static bool isEqual(const LocIdx &A, const LocIdx &B) { return A == B; }
377 /// A DbgOp whose ID (if any) has resolved to an actual location, LocIdx. Used
383 LocIdx Loc;
388 ResolvedDbgOp(LocIdx Loc) : Loc(Loc), IsConst(false) {}
651 using argument_type = LocIdx;
652 unsigned operator()(const LocIdx &L) const { return L.asU64(); }
678 /// LocationID => LocIdx
680 /// LocIdx => ValueIDNum
682 /// The aim here is that the LocIdx => ValueIDNum vector is just an array of
685 /// a LocIdx, you have to use the (sparse) LocationID => LocIdx map. And to
699 /// IndexedMap type, mapping from LocIdx to ValueIDNum.
707 /// LocIdx key / number for that location. There are always at least as many
709 /// is not being tracked, then the LocIdx value will be zero. New entries are
714 std::vector<LocIdx> LocIDToLocIdx;
759 /// produces a struct/pair containing the LocIdx key for this location,
764 LocIdx Idx;
769 value_type(LocIdx Idx, ValueIDNum &Value) : Idx(Idx), Value(Value) {}
770 const LocIdx Idx; /// Read-only index of this location.
774 MLocIterator(LocToValueType &ValueMap, LocIdx Idx)
786 void operator++() { Idx = LocIdx(Idx.asU64() + 1); }
788 value_type operator*() { return value_type(Idx, ValueMap[LocIdx(Idx)]); }
876 /// Clear all data. Destroys the LocID <=> LocIdx map, which makes most of
889 LocIDToLocIdx.resize(NumRegs, LocIdx::MakeIllegalLoc());
893 void setMLoc(LocIdx L, ValueIDNum Num) {
899 ValueIDNum readMLoc(LocIdx L) {
904 /// Create a LocIdx for an untracked register ID. Initialize it to either an
906 LocIdx trackRegister(unsigned ID);
908 LocIdx lookupOrTrackRegister(unsigned ID) {
909 LocIdx &Index = LocIDToLocIdx[ID];
917 LocIdx &Index = LocIDToLocIdx[R];
926 LocIdx Idx = lookupOrTrackRegister(ID);
935 LocIdx Idx = lookupOrTrackRegister(ID);
941 LocIdx Idx = lookupOrTrackRegister(ID);
951 LocIdx Idx = LocIDToLocIdx[ID];
955 /// Determine the LocIdx of an existing register.
956 LocIdx getRegMLoc(Register R) {
968 /// Find LocIdx for SpillLoc \p L, creating a new one if it's not tracked.
973 // Get LocIdx of a spill ID.
974 LocIdx getSpillMLoc(unsigned SpillID) {
980 bool isSpill(LocIdx Idx) const { return LocIdxToLocID[Idx] >= NumRegs; }
983 unsigned getLocSizeInBits(LocIdx L) const {
1006 std::string LocIdxToName(LocIdx Idx) const;
1127 using MLocTransferMap = SmallDenseMap<LocIdx, ValueIDNum>;
1217 std::optional<LocIdx> ReadLoc;
1355 /// number, the inner by LocIdx.
1501 bool isCalleeSaved(LocIdx L) const;
1517 std::optional<LocIdx> findLocationForMemOperand(const MachineInstr &MI);