mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-24 20:29:53 +00:00
Avoid creating BitVector temporaries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149188 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
19de016955
commit
685c23e758
@ -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…
Reference in New Issue
Block a user