mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-13 10:32:06 +00:00
cache result of operator*
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107974 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
fc36c0f21f
commit
5896935423
@ -1697,10 +1697,11 @@ bool SimplifyCFGOpt::run(BasicBlock *BB) {
|
|||||||
SmallVector<BasicBlock*, 8> UncondBranchPreds;
|
SmallVector<BasicBlock*, 8> UncondBranchPreds;
|
||||||
SmallVector<BranchInst*, 8> CondBranchPreds;
|
SmallVector<BranchInst*, 8> CondBranchPreds;
|
||||||
for (pred_iterator PI = pred_begin(BB), E = pred_end(BB); PI != E; ++PI) {
|
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 (BranchInst *BI = dyn_cast<BranchInst>(PTI)) {
|
||||||
if (BI->isUnconditional())
|
if (BI->isUnconditional())
|
||||||
UncondBranchPreds.push_back(*PI);
|
UncondBranchPreds.push_back(P);
|
||||||
else
|
else
|
||||||
CondBranchPreds.push_back(BI);
|
CondBranchPreds.push_back(BI);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user