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) {}
657 using argument_type = LocIdx;
658 unsigned operator()(const LocIdx &L) const { return L.asU64(); }
684 /// LocationID => LocIdx
686 /// LocIdx => ValueIDNum
688 /// The aim here is that the LocIdx => ValueIDNum vector is just an array of
691 /// a LocIdx, you have to use the (sparse) LocationID => LocIdx map. And to
705 /// IndexedMap type, mapping from LocIdx to ValueIDNum.
713 /// LocIdx key / number for that location. There are always at least as many
715 /// is not being tracked, then the LocIdx value will be zero. New entries are
720 std::vector<LocIdx> LocIDToLocIdx;
765 /// produces a struct/pair containing the LocIdx key for this location,
770 LocIdx Idx;
775 value_type(LocIdx Idx, ValueIDNum &Value) : Idx(Idx), Value(Value) {}
776 const LocIdx Idx; /// Read-only index of this location.
780 MLocIterator(LocToValueType &ValueMap, LocIdx Idx)
792 void operator++() { Idx = LocIdx(Idx.asU64() + 1); }
794 value_type operator*() { return value_type(Idx, ValueMap[LocIdx(Idx)]); }
882 /// Clear all data. Destroys the LocID <=> LocIdx map, which makes most of
895 LocIDToLocIdx.resize(NumRegs, LocIdx::MakeIllegalLoc());
899 void setMLoc(LocIdx L, ValueIDNum Num) {
905 ValueIDNum readMLoc(LocIdx L) {
910 /// Create a LocIdx for an untracked register ID. Initialize it to either an
912 LocIdx trackRegister(unsigned ID);
914 LocIdx lookupOrTrackRegister(unsigned ID) {
915 LocIdx &Index = LocIDToLocIdx[ID];
923 LocIdx &Index = LocIDToLocIdx[R];
932 LocIdx Idx = lookupOrTrackRegister(ID);
941 LocIdx Idx = lookupOrTrackRegister(ID);
947 LocIdx Idx = lookupOrTrackRegister(ID);
957 LocIdx Idx = LocIDToLocIdx[ID];
961 /// Determine the LocIdx of an existing register.
962 LocIdx getRegMLoc(Register R) {
974 /// Find LocIdx for SpillLoc \p L, creating a new one if it's not tracked.
979 // Get LocIdx of a spill ID.
980 LocIdx getSpillMLoc(unsigned SpillID) {
986 bool isSpill(LocIdx Idx) const { return LocIdxToLocID[Idx] >= NumRegs; }
989 unsigned getLocSizeInBits(LocIdx L) const {
1012 std::string LocIdxToName(LocIdx Idx) const;
1137 using MLocTransferMap = SmallDenseMap<LocIdx, ValueIDNum>;
1227 std::optional<LocIdx> ReadLoc;
1365 /// number, the inner by LocIdx.
1511 bool isCalleeSaved(LocIdx L) const;
1527 std::optional<LocIdx> findLocationForMemOperand(const MachineInstr &MI);