mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-17 05:29:24 +00:00
- Use correct header for SCEV inside LoopPass.cpp
- Move SCEVExpander::expand() out-of-line workarounding possible toolchain bug git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41197 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ebc5fea695
commit
96fea337d2
@ -93,16 +93,7 @@ namespace llvm {
|
||||
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();
|
||||
|
@ -14,7 +14,7 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "llvm/Analysis/LoopPass.h"
|
||||
#include "llvm/Analysis/ScalarEvolutionExpander.h"
|
||||
#include "llvm/Analysis/ScalarEvolution.h"
|
||||
using namespace llvm;
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
@ -207,3 +207,15 @@ Value *SCEVExpander::visitAddRecExpr(SCEVAddRecExpr *S) {
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user