[PATCH] D39732: [Analysis] Fix merging TBAA tags with different final access types

Ivan Kosarev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 7 09:20:26 PST 2017


kosarev added inline comments.


================
Comment at: lib/Analysis/TypeBasedAliasAnalysis.cpp:545
   TBAAStructTagNode TagA(A), TagB(B);
+  const MDNode *CommonType = getLeastCommonType(TagA.getAccessType(),
+                                                TagB.getAccessType());
----------------
hfinkel wrote:
> Can you please *explain* the problem in the patch description.
> 
> Also, we're now creating new metadata nodes speculatively (i.e., in cases where we we'll return false); can we avoid doing that? (maybe using a lambda function would help?)
Sure, sorry.

Re: creating nodes: we have to produce the generic tag regardless of whether the input tags may alias. We did it before and we do it now; the patch is not supposed to change anything in this regard.


Repository:
  rL LLVM

https://reviews.llvm.org/D39732





More information about the llvm-commits mailing list