[llvm-commits] [llvm] r100874 - /llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp
Dan Gohman
gohman at apple.com
Fri Apr 9 11:20:03 PDT 2010
Author: djg
Date: Fri Apr 9 13:20:03 2010
New Revision: 100874
URL: http://llvm.org/viewvc/llvm-project?rev=100874&view=rev
Log:
Add a comment.
Modified:
llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp
Modified: llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp?rev=100874&r1=100873&r2=100874&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp (original)
+++ llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp Fri Apr 9 13:20:03 2010
@@ -705,7 +705,8 @@
Sum = expandAddToGEP(NewOps.begin(), NewOps.end(), PTy, Ty, Sum);
} else if (const PointerType *PTy = dyn_cast<PointerType>(Op->getType())) {
// The running sum is an integer, and there's a pointer at this level.
- // Try to form a getelementptr.
+ // Try to form a getelementptr. Use a SCEVUnknown so that we don't
+ // re-analyze the instructions that we just emitted.
SmallVector<const SCEV *, 4> NewOps;
NewOps.push_back(SE.getUnknown(Sum));
for (++I; I != E && I->first == CurLoop; ++I)
More information about the llvm-commits
mailing list