[PATCH] D35380: [RuntimeUnroll] Add heuristic for unrolling multi-exit loop

Anna Thomas via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 13 13:15:00 PDT 2017


anna created this revision.

Add a profitability heuristic to enable runtime unrolling of multi-exit loop:
There can be atmost two unique exit blocks for the loop and the second
exit block should be a deoptimizing block.
Deoptimizing blocks are rarely taken so these additional number of branches
created due to the unrolling are predictable, since one of their target is the
deopt block.
Note: There are still additional optimizations that can be done over these
unrolled blocks, such as constant folding of values present in these unrolled
blocks that are used only in the deopt operand bundle.


https://reviews.llvm.org/D35380

Files:
  lib/Transforms/Utils/LoopUnrollRuntime.cpp
  test/Transforms/LoopUnroll/runtime-multiexit-heuristic.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D35380.106506.patch
Type: text/x-patch
Size: 7100 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170713/d74ac08d/attachment.bin>


More information about the llvm-commits mailing list