mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-21 02:24:22 +00:00
RAGreedy: Keep track of allocated PhysRegs internally
Do not use MachineRegisterInfo::setPhysRegUsed()/isPhysRegUsed() anymore. This bitset changes function-global state and is set by the VirtRegRewriter anyway. Simply use a bitvector private to RAGreedy. Differential Revision: http://reviews.llvm.org/D10910 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242169 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -131,6 +131,14 @@ void LiveRegMatrix::unassign(LiveInterval &VirtReg) {
|
||||
DEBUG(dbgs() << '\n');
|
||||
}
|
||||
|
||||
bool LiveRegMatrix::isPhysRegUsed(unsigned PhysReg) const {
|
||||
for (MCRegUnitIterator Unit(PhysReg, TRI); Unit.isValid(); ++Unit) {
|
||||
if (!Matrix[*Unit].empty())
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool LiveRegMatrix::checkRegMaskInterference(LiveInterval &VirtReg,
|
||||
unsigned PhysReg) {
|
||||
// Check if the cached information is valid.
|
||||
|
Reference in New Issue
Block a user