aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/ProfileData/Coverage/CoverageMapping.cpp
diff options
context:
space:
mode:
authorHaicheng Wu <haicheng@codeaurora.org>2016-10-12 21:29:38 +0000
committerHaicheng Wu <haicheng@codeaurora.org>2016-10-12 21:29:38 +0000
commit1ef17e90b20a2b6056ab27f022b320cb008899ca (patch)
treea8f48bb614546ebce2c76a2f381a64118f494d9a /llvm/lib/ProfileData/Coverage/CoverageMapping.cpp
parentd62669d7919a25329a7b9f212c48103dbcc5ca0f (diff)
downloadllvm-1ef17e90b20a2b6056ab27f022b320cb008899ca.zip
llvm-1ef17e90b20a2b6056ab27f022b320cb008899ca.tar.gz
llvm-1ef17e90b20a2b6056ab27f022b320cb008899ca.tar.bz2
Reapply "[LoopUnroll] Use the upper bound of the loop trip count to fullly unroll a loop"
Reappy r284044 after revert in r284051. Krzysztof fixed the error in r284049. The original summary: This patch tries to fully unroll loops having break statement like this for (int i = 0; i < 8; i++) { if (a[i] == value) { found = true; break; } } GCC can fully unroll such loops, but currently LLVM cannot because LLVM only supports loops having exact constant trip counts. The upper bound of the trip count can be obtained from calling ScalarEvolution::getMaxBackedgeTakenCount(). Part of the patch is the refactoring work in SCEV to prevent duplicating code. The feature of using the upper bound is enabled under the same circumstance when runtime unrolling is enabled since both are used to unroll loops without knowing the exact constant trip count. llvm-svn: 284053
Diffstat (limited to 'llvm/lib/ProfileData/Coverage/CoverageMapping.cpp')
0 files changed, 0 insertions, 0 deletions