This commit is mostly for experimentation purposes so far.
If the new iteration order is more successful, it would replace the previous one.
Details
- Reviewers
dcoughlin NoQ - Commits
- rGd1dd5c3a8872: [analyzer] Experiment with an iteration order only based on location, and not…
rC344313: [analyzer] Experiment with an iteration order only based on location, and not…
rL344313: [analyzer] Experiment with an iteration order only based on location, and not…
Diff Detail
- Repository
- rL LLVM
Event Timeline
I remember when I joined the project how my team used to analyze projects with every iteration order to which is the best, so I think this patch will be appreciated.
clang/include/clang/StaticAnalyzer/Core/PathSensitive/WorkList.h | ||
---|---|---|
61 ↗ | (On Diff #168933) | Completely unrelated to this revision, but this class needs some doc desperately IMO :/ |
clang/lib/StaticAnalyzer/Core/WorkList.cpp | ||
258 ↗ | (On Diff #168933) | CFGBlock::getBlockID returns with an unsigned int, did you mean this to be signed? I don't mean to be a living and breathing clang-tidy, but you explicitly mentioned using signed integer in the comment below. |
272 ↗ | (On Diff #168933) | I believe some bots like to complain if you don't make operator() const. |
299 ↗ | (On Diff #168933) | How about queue.push({U, {-NumVisited, ++Counter}});? |
Let's see how it goes!
That's a lot of code duplication, i guess it might make sense to refactor later.
clang/lib/StaticAnalyzer/Core/WorkList.cpp | ||
---|---|---|
258 ↗ | (On Diff #168933) | No, it doesn't need to be int; the comment below is about the other int. |
cfe/trunk/lib/StaticAnalyzer/Core/WorkList.cpp | ||
---|---|---|
297 | That's a great point. Pushing an update. |
I usually imagine queue as a horizontal thing, so it's unclear to me whether "top" is "left" or "right".