mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-05-18 22:38:56 +00:00
Fix a problem where we could infinitely recurse on phi nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19955 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
41ce39cbd7
commit
caa7c19fb4
@ -1163,7 +1163,7 @@ void ScalarEvolutionsImpl::UpdatePHIUserScalarEntries(Instruction *I,
|
|||||||
std::set<Instruction*> &UpdatedInsts) {
|
std::set<Instruction*> &UpdatedInsts) {
|
||||||
std::map<Value*, SCEVHandle>::iterator SI = Scalars.find(I);
|
std::map<Value*, SCEVHandle>::iterator SI = Scalars.find(I);
|
||||||
if (SI == Scalars.end()) return; // This scalar wasn't previous processed.
|
if (SI == Scalars.end()) return; // This scalar wasn't previous processed.
|
||||||
if (UpdatedInsts.insert(I).second) {
|
if (UpdatedInsts.insert(I).second && !isa<PHINode>(PN)) {
|
||||||
Scalars.erase(SI); // Remove the old entry
|
Scalars.erase(SI); // Remove the old entry
|
||||||
getSCEV(I); // Calculate the new entry
|
getSCEV(I); // Calculate the new entry
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user