[PATCH] D21233: [CFLAA] Code cleanup: remove redundant node-to-value mapping and value-to-node mapping

George Burgess IV via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 10 16:44:09 PDT 2016


george.burgess.iv added a comment.

Woohoo for deleting code! Two comments for you.


================
Comment at: lib/Analysis/CFLAliasAnalysis.cpp:547
@@ +546,3 @@
+      return nullptr;
+    else
+      return &Itr->second;
----------------
Nit: no else

================
Comment at: lib/Analysis/CFLAliasAnalysis.cpp:570
@@ +569,3 @@
+    auto &FromEdges = getOrCreateNode(From);
+    auto &ToEdges = getOrCreateNode(To);
+    FromEdges.push_back(Edge{Attr, Type, To});
----------------
This looks like it can make `FromEdges` a dangling reference if we resize the map while adding `To` :)


http://reviews.llvm.org/D21233





More information about the llvm-commits mailing list