Lines Matching refs:Id

82 const Id NoResult = 0;
114 typedef std::unordered_map<spv::Id, spv::Id> idmap_t;
115 typedef std::unordered_set<spv::Id> idset_t;
116 typedef std::unordered_map<spv::Id, int> blockmap_t;
121 typedef std::unordered_map<std::string, spv::Id> namemap_t;
126 typedef std::function<void(spv::Id&)> idfn_t;
130 static const spv::Id unmapped; // unchanged from default value
131 static const spv::Id unused; // unused ID
138 typedef std::map<spv::Id, typeentry_t> globaltypes_t;
142 typedef std::unordered_map<spv::Id, int> posmap_rev_t;
145 typedef std::unordered_map<spv::Id, unsigned> typesize_map_t;
157 unsigned typeSizeInWords(spv::Id id) const;
158 unsigned idTypeSizeInWords(spv::Id id) const;
162 spv::Id& asId(unsigned word) { return spv[word]; }
163 const spv::Id& asId(unsigned word) const { return spv[word]; }
168 spv::Id asTypeConstId(unsigned word) const { return asId(word + (isTypeOp(asOpCode(word)) ? 1 : 2)); }
169 unsigned idPos(spv::Id id) const;
176 spirword_t bound() const { return spv[3]; } // return Id bound from header
183 spv::Id localId(spv::Id id) const { return idMapL[id]; }
186 inline spv::Id localId(spv::Id id, spv::Id newId);
187 void countIds(spv::Id id);
192 inline spv::Id nextUnusedId(spv::Id id);
198 bool isNewIdMapped(spv::Id newId) const { return isMapped(newId); }
199 bool isOldIdUnmapped(spv::Id oldId) const { return localId(oldId) == unmapped; }
200 bool isOldIdUnused(spv::Id oldId) const { return localId(oldId) == unused; }
201 bool isOldIdMapped(spv::Id oldId) const { return !isOldIdUnused(oldId) && !isOldIdUnmapped(oldId); }
202 bool isFunction(spv::Id oldId) const { return fnPos.find(oldId) != fnPos.end(); }
204 // bool matchType(const globaltypes_t& globalTypes, spv::Id lt, spv::Id gt) const;
205 // spv::Id findType(const globaltypes_t& globalTypes, spv::Id lt) const;
241 bool isMapped(spv::Id id) const { return id < maxMappedId() && ((mapped[id/mBits] & (1LL<<(id%mBits))) != 0); }
242 void setMapped(spv::Id id) { resizeMapped(id); mapped[id/mBits] |= (1LL<<(id%mBits)); }
243 void resizeMapped(spv::Id id) { if (id >= maxMappedId()) mapped.resize(id/mBits+1, 0); }
252 std::unordered_map<spv::Id, range_t> fnPos;
255 std::unordered_map<spv::Id, int> fnCalls;
261 std::vector<spv::Id> idMapL; // ID {M}ap from {L}ocal to {G}lobal IDs
263 spv::Id entryPoint; // module entry point
264 spv::Id largestNewId; // biggest new ID we have mapped anything to