mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-21 06:30:16 +00:00
Transfer weights in transferSuccessorsAndUpdatePHIs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161805 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
cb6889b23d
commit
03e593efc6
@ -535,14 +535,13 @@ void MachineBasicBlock::transferSuccessors(MachineBasicBlock *fromMBB) {
|
||||
|
||||
while (!fromMBB->succ_empty()) {
|
||||
MachineBasicBlock *Succ = *fromMBB->succ_begin();
|
||||
uint32_t weight = 0;
|
||||
|
||||
uint32_t Weight = 0;
|
||||
|
||||
// If Weight list is empty it means we don't use it (disabled optimization).
|
||||
if (!fromMBB->Weights.empty())
|
||||
weight = *fromMBB->Weights.begin();
|
||||
Weight = *fromMBB->Weights.begin();
|
||||
|
||||
addSuccessor(Succ, weight);
|
||||
addSuccessor(Succ, Weight);
|
||||
fromMBB->removeSuccessor(Succ);
|
||||
}
|
||||
}
|
||||
@ -554,7 +553,10 @@ MachineBasicBlock::transferSuccessorsAndUpdatePHIs(MachineBasicBlock *fromMBB) {
|
||||
|
||||
while (!fromMBB->succ_empty()) {
|
||||
MachineBasicBlock *Succ = *fromMBB->succ_begin();
|
||||
addSuccessor(Succ);
|
||||
uint32_t Weight = 0;
|
||||
if (!fromMBB->Weights.empty())
|
||||
Weight = *fromMBB->Weights.begin();
|
||||
addSuccessor(Succ, Weight);
|
||||
fromMBB->removeSuccessor(Succ);
|
||||
|
||||
// Fix up any PHI nodes in the successor.
|
||||
|
Loading…
x
Reference in New Issue
Block a user