[PATCH] D69337: [PhiValues] Remove redundant searches in DenseMap

John Brawn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 15 09:47:34 PST 2019


john.brawn added a comment.

Reducing the repeated lookups in DepthMap seems reasonable, but the changes to the loop where ReachableMap is updated make it quite a bit more difficult to understand (as the task of updating ReachableMap is smushed together with the task of updating NonPhiReachableMap). Could you do just the first part? Or are there cases where this majorly speeds things up?



================
Comment at: llvm/lib/Analysis/PhiValues.cpp:87
       Reachable.insert(ComponentPhi);
-      DepthMap[ComponentPhi] = DepthNumber;
       for (Value *Op : ComponentPhi->incoming_values()) {
----------------
It looks like this line is deleted and there's no equivalent to it in the patch.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D69337/new/

https://reviews.llvm.org/D69337





More information about the llvm-commits mailing list