[llvm-commits] [llvm] r41197 - in /llvm/trunk: include/llvm/Analysis/ScalarEvolutionExpander.h lib/Analysis/LoopPass.cpp lib/Analysis/ScalarEvolutionExpander.cpp
Anton Korobeynikov
asl at math.spbu.ru
Mon Aug 20 14:17:26 PDT 2007
Author: asl
Date: Mon Aug 20 16:17:26 2007
New Revision: 41197
URL: http://llvm.org/viewvc/llvm-project?rev=41197&view=rev
Log:
- Use correct header for SCEV inside LoopPass.cpp
- Move SCEVExpander::expand() out-of-line workarounding possible toolchain bug
Modified:
llvm/trunk/include/llvm/Analysis/ScalarEvolutionExpander.h
llvm/trunk/lib/Analysis/LoopPass.cpp
llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp
Modified: llvm/trunk/include/llvm/Analysis/ScalarEvolutionExpander.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/ScalarEvolutionExpander.h?rev=41197&r1=41196&r2=41197&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/ScalarEvolutionExpander.h (original)
+++ llvm/trunk/include/llvm/Analysis/ScalarEvolutionExpander.h Mon Aug 20 16:17:26 2007
@@ -93,17 +93,8 @@
static Value *InsertBinop(Instruction::BinaryOps Opcode, Value *LHS,
Value *RHS, Instruction *&InsertPt);
protected:
- Value *expand(SCEV *S) {
- // Check to see if we already expanded this.
- std::map<SCEVHandle, Value*>::iterator I = InsertedExpressions.find(S);
- if (I != InsertedExpressions.end())
- return I->second;
-
- Value *V = visit(S);
- InsertedExpressions[S] = V;
- return V;
- }
-
+ Value *expand(SCEV *S);
+
Value *visitConstant(SCEVConstant *S) {
return S->getValue();
}
Modified: llvm/trunk/lib/Analysis/LoopPass.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/LoopPass.cpp?rev=41197&r1=41196&r2=41197&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/LoopPass.cpp (original)
+++ llvm/trunk/lib/Analysis/LoopPass.cpp Mon Aug 20 16:17:26 2007
@@ -14,7 +14,7 @@
//===----------------------------------------------------------------------===//
#include "llvm/Analysis/LoopPass.h"
-#include "llvm/Analysis/ScalarEvolutionExpander.h"
+#include "llvm/Analysis/ScalarEvolution.h"
using namespace llvm;
//===----------------------------------------------------------------------===//
Modified: llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp?rev=41197&r1=41196&r2=41197&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp (original)
+++ llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp Mon Aug 20 16:17:26 2007
@@ -207,3 +207,15 @@
return expand(V);
}
+
+Value *SCEVExpander::expand(SCEV *S) {
+ // Check to see if we already expanded this.
+ std::map<SCEVHandle, Value*>::iterator I = InsertedExpressions.find(S);
+ if (I != InsertedExpressions.end())
+ return I->second;
+
+ Value *V = visit(S);
+ InsertedExpressions[S] = V;
+ return V;
+}
+
More information about the llvm-commits
mailing list