[PATCH] D62989: [Unroll] Do NOT unroll a loop with small runtime upperbound
Z. Zheng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 6 17:52:14 PDT 2019
zzheng created this revision.
zzheng added reviewers: efriedma, haicheng.
Herald added a subscriber: dmgreen.
Herald added a project: LLVM.
For a runtime loop if we can compute its trip count upperbound:
Don't unroll if:
1. loop is not guaranteed to run either zero or upperbound iterations; and
2. trip count upperbound is less than UnrollMaxUpperBound
If unrolling, limit unroll factor to loop's trip count upperbound.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D62989
Files:
include/llvm/Transforms/Utils/UnrollLoop.h
lib/Transforms/Scalar/LoopUnrollAndJamPass.cpp
lib/Transforms/Scalar/LoopUnrollPass.cpp
test/Transforms/LoopUnroll/runtime-small-upperbound.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62989.203469.patch
Type: text/x-patch
Size: 9907 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190607/580bcc63/attachment.bin>
More information about the llvm-commits
mailing list