mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-04 19:26:30 +00:00
Avoid creating BitVector temporaries.
llvm-svn: 149188
This commit is contained in:
parent
033045b6da
commit
cc16458309
@ -234,10 +234,10 @@ void RegScavenger::forward() {
|
||||
}
|
||||
|
||||
void RegScavenger::getRegsUsed(BitVector &used, bool includeReserved) {
|
||||
if (includeReserved)
|
||||
used = ~RegsAvailable;
|
||||
else
|
||||
used = ~RegsAvailable & ~ReservedRegs;
|
||||
used = RegsAvailable;
|
||||
if (!includeReserved)
|
||||
used |= ReservedRegs;
|
||||
used.flip();
|
||||
}
|
||||
|
||||
unsigned RegScavenger::FindUnusedReg(const TargetRegisterClass *RC) const {
|
||||
@ -352,9 +352,9 @@ unsigned RegScavenger::scavengeRegister(const TargetRegisterClass *RC,
|
||||
// RegsAvailable, as RegsAvailable does not take aliases into account.
|
||||
// That's what getRegsAvailable() is for.
|
||||
BitVector Available = getRegsAvailable(RC);
|
||||
|
||||
if ((Candidates & Available).any())
|
||||
Candidates &= Available;
|
||||
Available &= Candidates;
|
||||
if (Available.any())
|
||||
Candidates = Available;
|
||||
|
||||
// Find the register whose use is furthest away.
|
||||
MachineBasicBlock::iterator UseMI;
|
||||
|
Loading…
x
Reference in New Issue
Block a user