MCPcopy Create free account
hub / github.com/KhronosGroup/SPIRV-Tools / GetAnnotations

Method GetAnnotations

source/opt/def_use_manager.cpp:208–219  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

206}
207
208std::vector<Instruction*> DefUseManager::GetAnnotations(uint32_t id) const {
209 std::vector<Instruction*> annos;
210 const Instruction* def = GetDef(id);
211 if (!def) return annos;
212
213 ForEachUser(def, [&annos](Instruction* user) {
214 if (IsAnnotationInst(user->opcode())) {
215 annos.push_back(user);
216 }
217 });
218 return annos;
219}
220
221void DefUseManager::AnalyzeDefUse(Module* module) {
222 if (!module) return;

Callers 2

ProcessMethod · 0.80
TEST_PFunction · 0.80

Calls 3

IsAnnotationInstFunction · 0.85
opcodeMethod · 0.45
push_backMethod · 0.45

Tested by 1

TEST_PFunction · 0.64