aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2011-12-09 06:19:40 +0000
committerAndrew Trick <atrick@apple.com>2011-12-09 06:19:40 +0000
commit5d73448bb7f3d326f310e6f35030821b103b1cdb (patch)
tree559f8f027346d2270472463686fa54187721d8d5 /include
parent9c181a92d8bc7af36839520c3e145bf11a6193fa (diff)
downloadexternal_llvm-5d73448bb7f3d326f310e6f35030821b103b1cdb.zip
external_llvm-5d73448bb7f3d326f310e6f35030821b103b1cdb.tar.gz
external_llvm-5d73448bb7f3d326f310e6f35030821b103b1cdb.tar.bz2
Add -unroll-runtime for unrolling loops with run-time trip counts.
Patch by Brendon Cahoon! This extends the existing LoopUnroll and LoopUnrollPass. Brendon measured no regressions in the llvm test suite with -unroll-runtime enabled. This implementation works by using the existing loop unrolling code to unroll the loop by a power-of-two (default 8). It generates an if-then-else sequence of code prior to the loop to execute the extra iterations before entering the unrolled loop. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146245 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Transforms/Utils/UnrollLoop.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/llvm/Transforms/Utils/UnrollLoop.h b/include/llvm/Transforms/Utils/UnrollLoop.h
index 7212a8c..f175e83 100644
--- a/include/llvm/Transforms/Utils/UnrollLoop.h
+++ b/include/llvm/Transforms/Utils/UnrollLoop.h
@@ -22,9 +22,12 @@ class Loop;
class LoopInfo;
class LPPassManager;
-bool UnrollLoop(Loop *L, unsigned Count, unsigned TripCount,
+bool UnrollLoop(Loop *L, unsigned Count, unsigned TripCount, bool AllowRuntime,
unsigned TripMultiple, LoopInfo* LI, LPPassManager* LPM);
+bool UnrollRuntimeLoopProlog(Loop *L, unsigned Count, LoopInfo *LI,
+ LPPassManager* LPM);
+
}
#endif