mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
Make SCEVExpander::addInsertedValue able to accept Values, not just
Instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70552 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3d81e31724
commit
99a1302ae4
@ -30,7 +30,7 @@ namespace llvm {
|
|||||||
ScalarEvolution &SE;
|
ScalarEvolution &SE;
|
||||||
LoopInfo &LI;
|
LoopInfo &LI;
|
||||||
std::map<SCEVHandle, Value*> InsertedExpressions;
|
std::map<SCEVHandle, Value*> InsertedExpressions;
|
||||||
std::set<Instruction*> InsertedInstructions;
|
std::set<Value*> InsertedValues;
|
||||||
|
|
||||||
BasicBlock::iterator InsertPt;
|
BasicBlock::iterator InsertPt;
|
||||||
|
|
||||||
@ -50,7 +50,7 @@ namespace llvm {
|
|||||||
/// inserted by the code rewriter. If so, the client should not modify the
|
/// inserted by the code rewriter. If so, the client should not modify the
|
||||||
/// instruction.
|
/// instruction.
|
||||||
bool isInsertedInstruction(Instruction *I) const {
|
bool isInsertedInstruction(Instruction *I) const {
|
||||||
return InsertedInstructions.count(I);
|
return InsertedValues.count(I);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// getOrInsertCanonicalInductionVariable - This method returns the
|
/// getOrInsertCanonicalInductionVariable - This method returns the
|
||||||
@ -66,9 +66,9 @@ namespace llvm {
|
|||||||
|
|
||||||
/// addInsertedValue - Remember the specified instruction as being the
|
/// addInsertedValue - Remember the specified instruction as being the
|
||||||
/// canonical form for the specified SCEV.
|
/// canonical form for the specified SCEV.
|
||||||
void addInsertedValue(Instruction *I, const SCEV *S) {
|
void addInsertedValue(Value *V, const SCEV *S) {
|
||||||
InsertedExpressions[S] = (Value*)I;
|
InsertedExpressions[S] = V;
|
||||||
InsertedInstructions.insert(I);
|
InsertedValues.insert(V);
|
||||||
}
|
}
|
||||||
|
|
||||||
void setInsertionPoint(BasicBlock::iterator NewIP) { InsertPt = NewIP; }
|
void setInsertionPoint(BasicBlock::iterator NewIP) { InsertPt = NewIP; }
|
||||||
|
Loading…
Reference in New Issue
Block a user