Remove redundant map searches.
For example, every call to "operator[]" is actually translated to a "find" call, and 2 consecutive calls to the operator, without changing the map in-between, is just redundant, and inefficient.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
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?
llvm/lib/Analysis/PhiValues.cpp | ||
---|---|---|
88 | It looks like this line is deleted and there's no equivalent to it in the patch. |
llvm/lib/Analysis/PhiValues.cpp | ||
---|---|---|
88 | It is done at line 124 of the patch. |
It looks like this line is deleted and there's no equivalent to it in the patch.