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

Anna Zaks via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 12 11:47:34 PDT 2016


zaks.anna added a comment.

Do you have results that show how this effects performance on average code and machine generated code?

One concern is that multiset is malloc intensive. See http://llvm.org/docs/ProgrammersManual.html#picking-the-right-data-structure-for-a-task.

Maybe SparseSet/SparseMultiSet would be better?



================
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;
----------------
'--wroklist.end()' -> 'worklist.rbegin()'?


Repository:
  rL LLVM

https://reviews.llvm.org/D25503





More information about the cfe-commits mailing list