[PATCH] D12008: [ScalarEvolutionExpander] Refactor isHighCostExpansionHelper division case
Sanjoy Das via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 16 18:05:18 PDT 2015
sanjoy requested changes to this revision.
This revision now requires changes to proceed.
================
Comment at: lib/Analysis/ScalarEvolutionExpander.cpp:1819
@@ -1818,3 +1818,3 @@
- SmallVector<BasicBlock *, 4> Latches;
- L->getLoopLatches(Latches);
+ SmallVector<BasicBlock *, 4> ExitingBlocks;
+ L->getExitingBlocks(ExitingBlocks);
----------------
Latches are not exiting blocks, so this is a semantic change. Perhaps this should be iterating over both exits and latches?
================
Comment at: lib/Analysis/ScalarEvolutionExpander.cpp:1890
@@ -1889,3 +1889,3 @@
// UDiv from the user's code. If we can't find a UDiv in the code with some
- // simple searching, assume the former consider UDivExpr expensive to
+ // simple searaching, assume the former consider UDivExpr expensive to
// compute.
----------------
Typo here?
================
Comment at: lib/Analysis/ScalarEvolutionExpander.cpp:1898
@@ +1897,3 @@
+ // this function. Now try to lookup 'S + 1' as it is common pattern
+ // involving division. This is just simple search heuristic.
+ if (!At)
----------------
Nit: "This is just a simple search heuristic."
Repository:
rL LLVM
http://reviews.llvm.org/D12008
More information about the llvm-commits
mailing list