mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-04 21:30:49 +00:00
cache dereferenced iterator
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109093 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a399781289
commit
3d8586eb63
@ -315,10 +315,11 @@ void Region::clearNodeCache() {
|
||||
|
||||
bool RegionInfo::isCommonDomFrontier(BasicBlock *BB, BasicBlock *entry,
|
||||
BasicBlock *exit) const {
|
||||
for (pred_iterator PI = pred_begin(BB), PE = pred_end(BB); PI != PE; ++PI)
|
||||
if (DT->dominates(entry, *PI) && !DT->dominates(exit, *PI))
|
||||
for (pred_iterator PI = pred_begin(BB), PE = pred_end(BB); PI != PE; ++PI) {
|
||||
BasicBlock *P = *PI;
|
||||
if (DT->dominates(entry, P) && !DT->dominates(exit, P))
|
||||
return false;
|
||||
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user