mirror of
git://c9x.me/qbe.git
synced 2026-04-05 18:09:47 +00:00
fix bug in predecessors filling code
This commit is contained in:
parent
83506f8b75
commit
6b1b97c996
4
ssa.c
4
ssa.c
@ -108,13 +108,13 @@ fillpreds(Fn *f)
|
|||||||
for (b=f->start; b; b=b->link) {
|
for (b=f->start; b; b=b->link) {
|
||||||
if (b->s1)
|
if (b->s1)
|
||||||
b->s1->npred++;
|
b->s1->npred++;
|
||||||
if (b->s2)
|
if (b->s2 && b->s2 != b->s1)
|
||||||
b->s2->npred++;
|
b->s2->npred++;
|
||||||
}
|
}
|
||||||
for (b=f->start; b; b=b->link) {
|
for (b=f->start; b; b=b->link) {
|
||||||
if (b->s1)
|
if (b->s1)
|
||||||
addpred(b, b->s1);
|
addpred(b, b->s1);
|
||||||
if (b->s2)
|
if (b->s2 && b->s2 != b->s1)
|
||||||
addpred(b, b->s2);
|
addpred(b, b->s2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user