mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-30 04:35:00 +00:00
In rememberInstruction, if the value being remembered is the
current insertion point, advance the current insertion point. This avoids a use-before-def situation in a testcase extracted from clang which is difficult to reduce to a reasonable-sized regression test. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96151 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0402577f38
commit
1d826a76f5
@ -168,9 +168,7 @@ namespace llvm {
|
|||||||
return S->getValue();
|
return S->getValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
void rememberInstruction(Value *I) {
|
void rememberInstruction(Value *I);
|
||||||
if (!PostIncLoop) InsertedValues.insert(I);
|
|
||||||
}
|
|
||||||
|
|
||||||
Value *expandAddRecExprLiterally(const SCEVAddRecExpr *);
|
Value *expandAddRecExprLiterally(const SCEVAddRecExpr *);
|
||||||
PHINode *getAddRecExprPHILiterally(const SCEVAddRecExpr *Normalized,
|
PHINode *getAddRecExprPHILiterally(const SCEVAddRecExpr *Normalized,
|
||||||
|
@ -1075,6 +1075,20 @@ Value *SCEVExpander::expand(const SCEV *S) {
|
|||||||
return V;
|
return V;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SCEVExpander::rememberInstruction(Value *I) {
|
||||||
|
if (!PostIncLoop)
|
||||||
|
InsertedValues.insert(I);
|
||||||
|
|
||||||
|
// If we just claimed an existing instruction and that instruction had
|
||||||
|
// been the insert point, adjust the insert point forward so that
|
||||||
|
// subsequently inserted code will be dominated.
|
||||||
|
if (Builder.GetInsertPoint() == I) {
|
||||||
|
BasicBlock::iterator It = cast<Instruction>(I);
|
||||||
|
do { ++It; } while (isInsertedInstruction(It));
|
||||||
|
Builder.SetInsertPoint(Builder.GetInsertBlock(), It);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// getOrInsertCanonicalInductionVariable - This method returns the
|
/// getOrInsertCanonicalInductionVariable - This method returns the
|
||||||
/// canonical induction variable of the specified type for the specified
|
/// canonical induction variable of the specified type for the specified
|
||||||
/// loop (inserting one if there is none). A canonical induction variable
|
/// loop (inserting one if there is none). A canonical induction variable
|
||||||
|
Loading…
x
Reference in New Issue
Block a user