Lines Matching refs:gv
63 static void cacheAnnotationFromMD(const Module *m, const GlobalValue *gv) {
75 if (entity != gv)
82 if (tmp.empty()) // no annotations for this gv
86 (*annotationCache)[m][gv] = tmp;
89 tmp1[gv] = tmp;
94 bool llvm::findOneNVVMAnnotation(const GlobalValue *gv, std::string prop,
96 const Module *m = gv->getParent();
98 cacheAnnotationFromMD(m, gv);
99 else if ((*annotationCache)[m].find(gv) == (*annotationCache)[m].end())
100 cacheAnnotationFromMD(m, gv);
101 if ((*annotationCache)[m][gv].find(prop) == (*annotationCache)[m][gv].end())
103 retval = (*annotationCache)[m][gv][prop][0];
107 bool llvm::findAllNVVMAnnotation(const GlobalValue *gv, std::string prop,
109 const Module *m = gv->getParent();
111 cacheAnnotationFromMD(m, gv);
112 else if ((*annotationCache)[m].find(gv) == (*annotationCache)[m].end())
113 cacheAnnotationFromMD(m, gv);
114 if ((*annotationCache)[m][gv].find(prop) == (*annotationCache)[m][gv].end())
116 retval = (*annotationCache)[m][gv][prop];
121 if (const GlobalValue *gv = dyn_cast<GlobalValue>(&val)) {
123 if (llvm::findOneNVVMAnnotation(gv,
134 if (const GlobalValue *gv = dyn_cast<GlobalValue>(&val)) {
136 if (llvm::findOneNVVMAnnotation(gv,
147 if (const GlobalValue *gv = dyn_cast<GlobalValue>(&val)) {
149 if (llvm::findOneNVVMAnnotation(gv,