[PATCH] D53058: [analyzer] Experiment with an iteration order only based on location, and not using the stack frame

Artem Dergachev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 11 17:43:10 PDT 2018


NoQ added a comment.

A few post-commit thoughts.



================
Comment at: cfe/trunk/lib/StaticAnalyzer/Core/WorkList.cpp:284
+
+  // The top item is the largest one.
+  llvm::PriorityQueue<QueueItem, std::vector<QueueItem>, ExplorationComparator>
----------------
I usually imagine queue as a horizontal thing, so it's unclear to me whether "top" is "left" or "right".


================
Comment at: cfe/trunk/lib/StaticAnalyzer/Core/WorkList.cpp:297
+    if (auto BE = N->getLocation().getAs<BlockEntrance>())
+      NumVisited = NumReached[BE->getBlock()->getBlockID()]++;
+
----------------
Does this mean that Block 1 in foo() and Block 1 in bar() will always have the same `NumReached` value?


Repository:
  rL LLVM

https://reviews.llvm.org/D53058





More information about the llvm-commits mailing list