diff options
author | Chris Lattner <sabre@nondot.org> | 2005-01-08 19:37:20 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-01-08 19:37:20 +0000 |
commit | d4bc564531ec9d7db7ec6630bc89f411f730cda1 (patch) | |
tree | e97cbc53ec0ba6ac0de66eed1b1c75a02302a1ce /lib/Transforms | |
parent | 2cc34627bb870b6a304efe673736fed2f6a63800 (diff) | |
download | external_llvm-d4bc564531ec9d7db7ec6630bc89f411f730cda1.zip external_llvm-d4bc564531ec9d7db7ec6630bc89f411f730cda1.tar.gz external_llvm-d4bc564531ec9d7db7ec6630bc89f411f730cda1.tar.bz2 |
Silence VS warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19380 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r-- | lib/Transforms/Scalar/LoopUnroll.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/Transforms/Scalar/LoopUnroll.cpp b/lib/Transforms/Scalar/LoopUnroll.cpp index 1b80787..8e62520 100644 --- a/lib/Transforms/Scalar/LoopUnroll.cpp +++ b/lib/Transforms/Scalar/LoopUnroll.cpp @@ -136,21 +136,23 @@ bool LoopUnroll::visitLoop(Loop *L) { ConstantInt *TripCountC = dyn_cast_or_null<ConstantInt>(L->getTripCount()); if (!TripCountC) return Changed; // Must have constant trip count! - unsigned TripCount = TripCountC->getRawValue(); - if (TripCount != TripCountC->getRawValue() || TripCount == 0) + uint64_t TripCountFull = TripCountC->getRawValue(); + if (TripCountFull != TripCountC->getRawValue() || TripCountFull == 0) return Changed; // More than 2^32 iterations??? unsigned LoopSize = ApproximateLoopSize(L); DEBUG(std::cerr << "Loop Unroll: F[" << BB->getParent()->getName() << "] Loop %" << BB->getName() << " Loop Size = " << LoopSize - << " Trip Count = " << TripCount << " - "); - uint64_t Size = (uint64_t)LoopSize*(uint64_t)TripCount; + << " Trip Count = " << TripCountFull << " - "); + uint64_t Size = (uint64_t)LoopSize*TripCountFull; if (Size > UnrollThreshold) { DEBUG(std::cerr << "TOO LARGE: " << Size << ">" << UnrollThreshold << "\n"); return Changed; } DEBUG(std::cerr << "UNROLLING!\n"); - + + unsigned TripCount = (unsigned)TripCountFull; + BasicBlock *LoopExit = BI->getSuccessor(L->contains(BI->getSuccessor(0))); // Create a new basic block to temporarily hold all of the cloned code. |