diff options
author | Andrew Trick <atrick@apple.com> | 2012-05-08 02:52:09 +0000 |
---|---|---|
committer | Andrew Trick <atrick@apple.com> | 2012-05-08 02:52:09 +0000 |
commit | b78d83d837fc72a6565f186b0ad92d48cdfdb805 (patch) | |
tree | 3eb7547a8950cc4fa5e8214f27e363d74edf9386 /lib/Transforms/Utils/LoopUnrollRuntime.cpp | |
parent | 92ff7cae7c5a6ce236549516119a9e0b2e71fda0 (diff) |
Allow NULL LoopPassManager argument in UnrollLoop. PR12734.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156358 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/LoopUnrollRuntime.cpp')
-rw-r--r-- | lib/Transforms/Utils/LoopUnrollRuntime.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Transforms/Utils/LoopUnrollRuntime.cpp b/lib/Transforms/Utils/LoopUnrollRuntime.cpp index 3aa6befe1f..7672726cb3 100644 --- a/lib/Transforms/Utils/LoopUnrollRuntime.cpp +++ b/lib/Transforms/Utils/LoopUnrollRuntime.cpp @@ -237,6 +237,8 @@ bool llvm::UnrollRuntimeLoopProlog(Loop *L, unsigned Count, LoopInfo *LI, // Use Scalar Evolution to compute the trip count. This allows more // loops to be unrolled than relying on induction var simplification + if (!LPM) + return false; ScalarEvolution *SE = LPM->getAnalysisIfAvailable<ScalarEvolution>(); if (SE == 0) return false; |