[llvm-commits] [llvm] r71262 - in /llvm/trunk: include/llvm/Analysis/ScalarEvolution.h lib/Analysis/ScalarEvolution.cpp
Dan Gohman
gohman at apple.com
Fri May 8 13:58:39 PDT 2009
Author: djg
Date: Fri May 8 15:58:38 2009
New Revision: 71262
URL: http://llvm.org/viewvc/llvm-project?rev=71262&view=rev
Log:
Fix another bug in r71252. This code supports GetElementPtr
constant exprs as well as instructions.
Modified:
llvm/trunk/include/llvm/Analysis/ScalarEvolution.h
llvm/trunk/lib/Analysis/ScalarEvolution.cpp
Modified: llvm/trunk/include/llvm/Analysis/ScalarEvolution.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/ScalarEvolution.h?rev=71262&r1=71261&r2=71262&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/ScalarEvolution.h (original)
+++ llvm/trunk/include/llvm/Analysis/ScalarEvolution.h Fri May 8 15:58:38 2009
@@ -286,7 +286,7 @@
/// createNodeForGEP - Provide the special handling we need to analyze GEP
/// SCEVs.
- SCEVHandle createNodeForGEP(GetElementPtrInst *GEP);
+ SCEVHandle createNodeForGEP(User *GEP);
/// ReplaceSymbolicValueWithConcrete - This looks up the computed SCEV value
/// for the specified instruction and replaces any references to the
Modified: llvm/trunk/lib/Analysis/ScalarEvolution.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolution.cpp?rev=71262&r1=71261&r2=71262&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/ScalarEvolution.cpp (original)
+++ llvm/trunk/lib/Analysis/ScalarEvolution.cpp Fri May 8 15:58:38 2009
@@ -1866,7 +1866,7 @@
/// createNodeForGEP - Expand GEP instructions into add and multiply
/// operations. This allows them to be analyzed by regular SCEV code.
///
-SCEVHandle ScalarEvolution::createNodeForGEP(GetElementPtrInst *GEP) {
+SCEVHandle ScalarEvolution::createNodeForGEP(User *GEP) {
const Type *IntPtrTy = TD->getIntPtrType();
Value *Base = GEP->getOperand(0);
@@ -2113,7 +2113,7 @@
case Instruction::GetElementPtr:
if (!TD) break; // Without TD we can't analyze pointers.
- return createNodeForGEP(cast<GetElementPtrInst>(U));
+ return createNodeForGEP(U);
case Instruction::PHI:
return createNodeForPHI(cast<PHINode>(U));
More information about the llvm-commits
mailing list