Lines Matching refs:gv
72 static void cacheAnnotationFromMD(const Module *m, const GlobalValue *gv) {
86 if (entity != gv)
93 if (tmp.empty()) // no annotations for this gv
97 (*annotationCache)[m][gv] = std::move(tmp);
100 tmp1[gv] = std::move(tmp);
105 bool findOneNVVMAnnotation(const GlobalValue *gv, const std::string &prop,
108 const Module *m = gv->getParent();
110 cacheAnnotationFromMD(m, gv);
111 else if ((*annotationCache)[m].find(gv) == (*annotationCache)[m].end())
112 cacheAnnotationFromMD(m, gv);
113 if ((*annotationCache)[m][gv].find(prop) == (*annotationCache)[m][gv].end())
115 retval = (*annotationCache)[m][gv][prop][0];
119 bool findAllNVVMAnnotation(const GlobalValue *gv, const std::string &prop,
122 const Module *m = gv->getParent();
124 cacheAnnotationFromMD(m, gv);
125 else if ((*annotationCache)[m].find(gv) == (*annotationCache)[m].end())
126 cacheAnnotationFromMD(m, gv);
127 if ((*annotationCache)[m][gv].find(prop) == (*annotationCache)[m][gv].end())
129 retval = (*annotationCache)[m][gv][prop];
134 if (const GlobalValue *gv = dyn_cast<GlobalValue>(&val)) {
136 if (findOneNVVMAnnotation(gv, "texture", annot)) {
145 if (const GlobalValue *gv = dyn_cast<GlobalValue>(&val)) {
147 if (findOneNVVMAnnotation(gv, "surface", annot)) {
158 if (const GlobalValue *gv = dyn_cast<GlobalValue>(&val)) {
160 if (findOneNVVMAnnotation(gv, AnnotationName, annot)) {
217 if(const GlobalValue *gv = dyn_cast<GlobalValue>(&val)) {
219 if (findOneNVVMAnnotation(gv, "managed", annot)) {