mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-14 16:33:28 +00:00
SelectionDAGBuilder::handleJTSwitchCase, simplify loop; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232830 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1188480049
commit
13e18d951c
@ -2337,15 +2337,10 @@ bool SelectionDAGBuilder::handleJTSwitchCase(CaseRec &CR,
|
||||
|
||||
// Calculate weight for each unique destination in CR.
|
||||
DenseMap<MachineBasicBlock*, uint32_t> DestWeights;
|
||||
if (FuncInfo.BPI)
|
||||
for (CaseItr I = CR.Range.first, E = CR.Range.second; I != E; ++I) {
|
||||
DenseMap<MachineBasicBlock*, uint32_t>::iterator Itr =
|
||||
DestWeights.find(I->BB);
|
||||
if (Itr != DestWeights.end())
|
||||
Itr->second += I->ExtraWeight;
|
||||
else
|
||||
DestWeights[I->BB] = I->ExtraWeight;
|
||||
}
|
||||
if (FuncInfo.BPI) {
|
||||
for (CaseItr I = CR.Range.first, E = CR.Range.second; I != E; ++I)
|
||||
DestWeights[I->BB] += I->ExtraWeight;
|
||||
}
|
||||
|
||||
// Update successor info. Add one edge to each unique successor.
|
||||
BitVector SuccsHandled(CR.CaseBB->getParent()->getNumBlockIDs());
|
||||
|
Loading…
x
Reference in New Issue
Block a user