[PATCH] D35294: [CGP] Allow cycles during Phi traversal in OptimizaMemoryInst

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 12 12:33:47 PDT 2017


efriedma added inline comments.


================
Comment at: lib/CodeGen/CodeGenPrepare.cpp:4285
+    if (!Visited.insert(V).second)
+      continue;
 
----------------
When you're looking through a PHI node, equality can be deceptive; induction variables are the "same", but can have a different value.   (We got into trouble with BasicAA doing that recently.) I'd like to see a comment explaining why this particular version of the algorithm is correct.


https://reviews.llvm.org/D35294





More information about the llvm-commits mailing list