[llvm-commits] [llvm] r107974 - /llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp
Gabor Greif
ggreif at gmail.com
Fri Jul 9 08:25:09 PDT 2010
Author: ggreif
Date: Fri Jul 9 10:25:09 2010
New Revision: 107974
URL: http://llvm.org/viewvc/llvm-project?rev=107974&view=rev
Log:
cache result of operator*
Modified:
llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp
Modified: llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp?rev=107974&r1=107973&r2=107974&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp Fri Jul 9 10:25:09 2010
@@ -1697,10 +1697,11 @@
SmallVector<BasicBlock*, 8> UncondBranchPreds;
SmallVector<BranchInst*, 8> CondBranchPreds;
for (pred_iterator PI = pred_begin(BB), E = pred_end(BB); PI != E; ++PI) {
- TerminatorInst *PTI = (*PI)->getTerminator();
+ BasicBlock *P = *PI;
+ TerminatorInst *PTI = P->getTerminator();
if (BranchInst *BI = dyn_cast<BranchInst>(PTI)) {
if (BI->isUnconditional())
- UncondBranchPreds.push_back(*PI);
+ UncondBranchPreds.push_back(P);
else
CondBranchPreds.push_back(BI);
}
More information about the llvm-commits
mailing list