[PATCH] D39953: [CodeGen] Do not lookup for cached TBAA metadata nodes twice
John McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 13 10:41:47 PST 2017
rjmccall added inline comments.
================
Comment at: lib/CodeGen/CodeGenTBAA.cpp:267
+ if (N)
return N;
----------------
The main danger with persisting this kind of reference is that DenseMap doesn't actually guarantee stability, so if there are recursive calls that can grow the data structure, the reference will become dangling. I think your patch is okay for the previous two functions, although I'd like you to check that, but in this function I'm confident that it's wrong, because you definitely recursively call getBaseTypeInfo below.
Repository:
rL LLVM
https://reviews.llvm.org/D39953
More information about the cfe-commits
mailing list