mirror of
https://github.com/RPCS3/llvm.git
synced 2025-03-01 15:19:05 +00:00
ScheduleDAGInstrs: When adding uses we add them into a set that's empty at the beginning, no need to maintain another set for the added regs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152934 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
861ea230a7
commit
a82d526b31
@ -209,13 +209,13 @@ void ScheduleDAGInstrs::addSchedBarrierDeps() {
|
|||||||
} else {
|
} else {
|
||||||
// For others, e.g. fallthrough, conditional branch, assume the exit
|
// For others, e.g. fallthrough, conditional branch, assume the exit
|
||||||
// uses all the registers that are livein to the successor blocks.
|
// uses all the registers that are livein to the successor blocks.
|
||||||
SmallSet<unsigned, 8> Seen;
|
assert(Uses.empty() && "Uses in set before adding deps?");
|
||||||
for (MachineBasicBlock::succ_iterator SI = BB->succ_begin(),
|
for (MachineBasicBlock::succ_iterator SI = BB->succ_begin(),
|
||||||
SE = BB->succ_end(); SI != SE; ++SI)
|
SE = BB->succ_end(); SI != SE; ++SI)
|
||||||
for (MachineBasicBlock::livein_iterator I = (*SI)->livein_begin(),
|
for (MachineBasicBlock::livein_iterator I = (*SI)->livein_begin(),
|
||||||
E = (*SI)->livein_end(); I != E; ++I) {
|
E = (*SI)->livein_end(); I != E; ++I) {
|
||||||
unsigned Reg = *I;
|
unsigned Reg = *I;
|
||||||
if (Seen.insert(Reg))
|
if (!Uses.contains(Reg))
|
||||||
Uses[Reg].push_back(&ExitSU);
|
Uses[Reg].push_back(&ExitSU);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user