[PATCH] D26635: [TBAA] Don't generate invalid TBAA when merging nodes

Manman Ren via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 15 16:30:22 PST 2016


manmanren added a comment.

Cheers,

Manman



================
Comment at: lib/Analysis/TypeBasedAliasAnalysis.cpp:462
+  // the root node.  In either case, we don't have any useful TBAA
+  // metadata to attach.
+  if (!Ret || Ret->getNumOperands() < 2)
----------------
When the only common base is the root node, is it illegal to generate a tag based on the root?


================
Comment at: unittests/Analysis/TBAATest.cpp:75
+  auto *RootMD = MD.createTBAARoot("tbaa-root");
+  auto *MD1 = MD.createTBAANode("scalar-a", RootMD);
+  auto *StructTag1 = MD.createTBAAStructTagNode(MD1, MD1, 0);
----------------
Why are we testing the old scalar TBAA here with createTBAANode?


https://reviews.llvm.org/D26635





More information about the llvm-commits mailing list