mirror of
https://github.com/RPCS3/llvm.git
synced 2024-11-25 21:00:00 +00:00
Don't call dominates on unreachable instructions. Should fix the dragonegg
build. Testcase is still reducing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151474 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
34674743f5
commit
5465c9422f
@ -350,14 +350,18 @@ namespace {
|
||||
|
||||
bool shouldExplore(Use *U) {
|
||||
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 true;
|
||||
}
|
||||
|
||||
bool captured(Use *U) {
|
||||
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;
|
||||
Captured = true;
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user