Don't call dominates on unreachable instructions. Should fix the dragonegg
build. Testcase is still reducing. llvm-svn: 151474
This commit is contained in:
parent
a1d6afeddf
commit
b660977c67
|
@ -350,14 +350,18 @@ namespace {
|
||||||
|
|
||||||
bool shouldExplore(Use *U) {
|
bool shouldExplore(Use *U) {
|
||||||
Instruction *I = cast<Instruction>(U->getUser());
|
Instruction *I = cast<Instruction>(U->getUser());
|
||||||
if (BeforeHere != I && DT->dominates(BeforeHere, I))
|
BasicBlock *BB = I->getParent();
|
||||||
|
if (BeforeHere != I &&
|
||||||
|
(!DT->isReachableFromEntry(BB) || DT->dominates(BeforeHere, I)))
|
||||||
return false;
|
return false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool captured(Use *U) {
|
bool captured(Use *U) {
|
||||||
Instruction *I = cast<Instruction>(U->getUser());
|
Instruction *I = cast<Instruction>(U->getUser());
|
||||||
if (BeforeHere != I && DT->dominates(BeforeHere, I))
|
BasicBlock *BB = I->getParent();
|
||||||
|
if (BeforeHere != I &&
|
||||||
|
(!DT->isReachableFromEntry(BB) || DT->dominates(BeforeHere, I)))
|
||||||
return false;
|
return false;
|
||||||
Captured = true;
|
Captured = true;
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue