[llvm-commits] [llvm] r109093 - /llvm/trunk/lib/Analysis/RegionInfo.cpp
Gabor Greif
ggreif at gmail.com
Thu Jul 22 04:07:47 PDT 2010
Author: ggreif
Date: Thu Jul 22 06:07:46 2010
New Revision: 109093
URL: http://llvm.org/viewvc/llvm-project?rev=109093&view=rev
Log:
cache dereferenced iterator
Modified:
llvm/trunk/lib/Analysis/RegionInfo.cpp
Modified: llvm/trunk/lib/Analysis/RegionInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/RegionInfo.cpp?rev=109093&r1=109092&r2=109093&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/RegionInfo.cpp (original)
+++ llvm/trunk/lib/Analysis/RegionInfo.cpp Thu Jul 22 06:07:46 2010
@@ -315,10 +315,11 @@
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;
}
More information about the llvm-commits
mailing list