Lines Matching defs:LocIndex
205 struct LocIndex {
242 LocIndex(u32_location_t Location, u32_index_t Index)
249 template<typename IntT> static LocIndex fromRawInteger(IntT ID) {
251 "Cannot convert raw integer to LocIndex");
259 return LocIndex(Reg, 0).getAsRawInteger();
266 uint64_t Start = LocIndex(Location, 0).getAsRawInteger();
267 uint64_t End = LocIndex(Location + 1, 0).getAsRawInteger();
273 using VarLocsInRange = SmallSet<LocIndex::u32_index_t, 32>;
274 // Vector of all `LocIndex`s for a given VarLoc; the same Location should not
277 using LocIndices = SmallVector<LocIndex, 2>;
786 /// 2) Given a LocIndex, look up the unique associated VarLoc.
794 SmallDenseMap<LocIndex::u32_location_t, std::vector<VarLoc>> Loc2Vars;
803 SmallVector<LocIndex::u32_location_t, 4> Locations;
813 return RegNo < LocIndex::kFirstInvalidRegLocation;
817 Locations.push_back(LocIndex::kSpillLocation);
819 Locations.push_back(LocIndex::kWasmLocation);
821 LocIndex::u32_location_t Loc = LocIndex::kEntryValueBackupLocation;
824 Locations.push_back(LocIndex::kUniversalLocation);
825 for (LocIndex::u32_location_t Location : Locations) {
828 {Location, static_cast<LocIndex::u32_index_t>(Vars.size())});
841 const VarLoc &operator[](LocIndex ID) const {
852 LocIndex LocationID; ///< Location number for the transfer dest.
857 using InstToEntryLocMap = std::multimap<const MachineInstr *, LocIndex>;
924 LocIndex::u32_location_t Location);
957 return LocIndex::indexRangeForLocation(getVarLocs(), Reg);
962 return LocIndex::indexRangeForLocation(getVarLocs(),
963 LocIndex::kSpillLocation);
969 return LocIndex::indexRangeForLocation(
970 getVarLocs(), LocIndex::kEntryValueBackupLocation);
975 return LocIndex::indexRangeForLocation(getVarLocs(),
976 LocIndex::kWasmLocation);
1033 LocIndex OldVarID, TransferKind Kind,
1124 for (LocIndex ID : IDs)
1154 LocIndex::u32_location_t Location) {
1156 for (LocIndex::u32_index_t ID : KillSet) {
1157 const VarLoc &VL = VarLocIDs[LocIndex(Location, ID)];
1161 for (LocIndex ID : VLI)
1171 Regs.insert(LocIndex::kUniversalLocation);
1174 LocIndex Idx = LocIndex::fromRawInteger(ID);
1184 for (LocIndex ID : VarLocIDs)
1208 auto It = CollectFrom.find(LocIndex::rawIndexForReg(SortedRegs.front()));
1214 uint64_t FirstIndexForReg = LocIndex::rawIndexForReg(Reg);
1215 uint64_t FirstInvalidIndex = LocIndex::rawIndexForReg(Reg + 1);
1220 LocIndex ItIdx = LocIndex::fromRawInteger(*It);
1224 assert(LI.back().Location == LocIndex::kUniversalLocation &&
1240 LocIndex::rawIndexForReg(LocIndex::kFirstRegLocation);
1242 LocIndex::rawIndexForReg(LocIndex::kFirstInvalidRegLocation);
1248 uint32_t FoundReg = LocIndex::fromRawInteger(*It).Location;
1256 uint64_t NextRegIndex = LocIndex::rawIndexForReg(FoundReg + 1);
1374 const VarLoc &VL = VarLocIDs[LocIndex::fromRawInteger(ID)];
1450 uint64_t FirstIndex = LocIndex::rawIndexForReg(LocIndex::kUniversalLocation);
1452 LocIndex::rawIndexForReg(LocIndex::kUniversalLocation + 1);
1456 LocIndex RegIdx = LocIndex::fromRawInteger(*It);
1473 LocIndex Idx = LocIndex(LocIndex::kUniversalLocation, ID);
1505 VarLocMap &VarLocIDs, LocIndex OldVarID, TransferKind Kind,
1636 OpenRanges.erase(KillSet, VarLocIDs, LocIndex::kUniversalLocation);
1660 LocIndex Idx = LocIndex::fromRawInteger(ID);
1666 OpenRanges.erase(KillSet, VarLocIDs, LocIndex::kWasmLocation);
1762 LocIndex Idx = LocIndex::fromRawInteger(ID);
1784 OpenRanges.erase(KillSet, VarLocIDs, LocIndex::kSpillLocation);
1809 LocIndex Idx = LocIndex::fromRawInteger(ID);
1876 LocIndex Idx = LocIndex::fromRawInteger(ID);
1897 LocIndex Idx = LocIndex::fromRawInteger(ID);
2069 LocIndex Idx = LocIndex::fromRawInteger(ID);