This is follow up after http://reviews.llvm.org/D11687
In SCEVUDivExpr case inside isHighCostExpansionHelper we had lookup code which was almost exactly same as code inside findExistingExpansion. Refactor it to make use of the existing function.
Differential D12008
[ScalarEvolutionExpander] Refactor isHighCostExpansionHelper division case igor-laevsky on Aug 13 2015, 7:53 AM. Authored by
Details This is follow up after http://reviews.llvm.org/D11687 In SCEVUDivExpr case inside isHighCostExpansionHelper we had lookup code which was almost exactly same as code inside findExistingExpansion. Refactor it to make use of the existing function.
Diff Detail
Event Timeline
Comment Actions LGTM, but please mention something along the lines of "However this heuristic is based on the fact that we are looking at the loop exit conditions. All latches which exit loop should be listed in the ExitingBlocks. So the overall heuristic stays roughly the same." in the commit message.
|
Latches are not exiting blocks, so this is a semantic change. Perhaps this should be iterating over both exits and latches?