[PATCH] D25503: [analyzer] Remove superquadratic behaviour from DataflowWorklist

Alexander Shaposhnikov via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 12 13:26:04 PDT 2016


alexshap added inline comments.


================
Comment at: lib/Analysis/LiveVariables.cpp:66
     return nullptr;
-  const CFGBlock *b = worklist.pop_back_val();
+  const auto I = --worklist.end();
+  const CFGBlock *b = *I;
----------------
alexshap wrote:
> zaks.anna wrote:
> > '--wroklist.end()' -> 'worklist.rbegin()'?
> 1. rbegin - OK - will update the diff
> 2. regarding http://llvm.org/docs/doxygen/html/classllvm_1_1SparseSet.html and 
> http://llvm.org/docs/ProgrammersManual.html#set-like-containers-std-set-smallset-setvector-etc
> (i took a look at it before) - the problem is that i don't see any containers which take a custom comparator & provide "ordered set"-like functionality there.
> 3. regarding the performance - i can run static analyzer against LLVM and measure the time (compare the old version with this one). Will post the results here.  
4. Will test the approach suggested by @NoQ as well.


Repository:
  rL LLVM

https://reviews.llvm.org/D25503





More information about the cfe-commits mailing list