Skip to content

Commit e8d3dbf

Browse files
Address a comment.
1 parent c7600fc commit e8d3dbf

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

llvm/lib/Target/NVPTX/NVPTXUtilities.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,8 @@ static std::optional<unsigned> findOneNVVMAnnotation(const GlobalValue *gv,
133133
cacheAnnotationFromMD(m, gv);
134134
else if (ACIt->second.find(gv) == ACIt->second.end())
135135
cacheAnnotationFromMD(m, gv);
136+
// Look up AC.Cache[m][gv] again because cacheAnnotationFromMD may have
137+
// inserted the entry.
136138
auto &KVP = AC.Cache[m][gv];
137139
auto It = KVP.find(prop);
138140
if (It == KVP.end())
@@ -151,6 +153,8 @@ static bool findAllNVVMAnnotation(const GlobalValue *gv,
151153
cacheAnnotationFromMD(m, gv);
152154
else if (ACIt->second.find(gv) == ACIt->second.end())
153155
cacheAnnotationFromMD(m, gv);
156+
// Look up AC.Cache[m][gv] again because cacheAnnotationFromMD may have
157+
// inserted the entry.
154158
auto &KVP = AC.Cache[m][gv];
155159
auto It = KVP.find(prop);
156160
if (It == KVP.end())

0 commit comments

Comments
 (0)