[PATCH] D11758: [Unroll] Implement a conservative and monotonically increasing cost tracking system during the full unroll heuristic analysis that avoids counting any instruction cost until that instruction becomes "live" through a side-effect or use outside the...

Michael Zolotukhin via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 4 16:44:33 PST 2016


mzolotukhin updated this revision to Diff 49862.
mzolotukhin added a comment.

- Rebase onto TOT.
- Only work on inner loops: we can't accurately estimate cost of instructions from inner loops when analyzing an outer loop, and we won't be visiting inner loops later anyway, so even if unrolling of the outer loop could expose new opportunities in inner loops, we won't be catching them now. We can revisit this later.
- Don't unroll loop with calls inside. Experiments showed some problems with such loops (our estimate is far from accurate for them), and disabling it doesn't hurt any test. Again, we can revisit it later if we have better way to estimate a cost of calls.


http://reviews.llvm.org/D11758

Files:
  include/llvm/Analysis/LoopUnrollAnalyzer.h
  lib/Analysis/LoopUnrollAnalyzer.cpp
  lib/Transforms/LoopUnroll/full-unroll-heuristics-dce.ll
  lib/Transforms/Scalar/LoopUnrollPass.cpp
  test/Transforms/LoopUnroll/full-unroll-heuristics-2.ll
  unittests/Analysis/UnrollAnalyzer.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11758.49862.patch
Type: text/x-patch
Size: 15542 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160305/53b5a5da/attachment.bin>


More information about the llvm-commits mailing list