aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Sema/SemaCodeComplete.cpp
diff options
context:
space:
mode:
authorJohn Brawn <john.brawn@arm.com>2016-10-18 10:10:53 +0000
committerJohn Brawn <john.brawn@arm.com>2016-10-18 10:10:53 +0000
commitecf79300dd78b561f138c5d543b6d27d9ab766de (patch)
tree9e563897a1008479faf0fce176dcc66aed92cc09 /clang/lib/Sema/SemaCodeComplete.cpp
parent692f4e95cf0ab7c58cbac2e5f12fbc4e87e07ea7 (diff)
downloadllvm-ecf79300dd78b561f138c5d543b6d27d9ab766de.zip
llvm-ecf79300dd78b561f138c5d543b6d27d9ab766de.tar.gz
llvm-ecf79300dd78b561f138c5d543b6d27d9ab766de.tar.bz2
[SCEV] More accurate calculation of max backedge count of some less-than loops
In loops that look something like i = n; do { ... } while(i++ < n+k); where k is a constant, the maximum backedge count is k (in fact the backedge count will be either 0 or k, depending on whether n+k wraps). More generally for LHS < RHS if RHS-(LHS of first comparison) is a constant then the loop will iterate either 0 or that constant number of times. This allows for more loop unrolling with the recent upper bound loop unrolling changes, and I'm working on a patch that will let loop unrolling additionally make use of the loop being executed either 0 or k times (we need to retain the loop comparison only on the first unrolled iteration). Differential Revision: https://reviews.llvm.org/D25607 llvm-svn: 284465
Diffstat (limited to 'clang/lib/Sema/SemaCodeComplete.cpp')
0 files changed, 0 insertions, 0 deletions