mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +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:
@@ -203,6 +203,11 @@ public:
|
||||
assert(idx < Size && "idx out of bounds");
|
||||
return LIUs[idx];
|
||||
}
|
||||
|
||||
const LiveIntervalUnion& operator[](unsigned Idx) const {
|
||||
assert(Idx < Size && "Idx out of bounds");
|
||||
return LIUs[Idx];
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
|
@@ -114,6 +114,9 @@ public:
|
||||
/// the assignment and updates VirtRegMap accordingly.
|
||||
void unassign(LiveInterval &VirtReg);
|
||||
|
||||
/// Returns true if the given \p PhysReg has any live intervals assigned.
|
||||
bool isPhysRegUsed(unsigned PhysReg) const;
|
||||
|
||||
//===--------------------------------------------------------------------===//
|
||||
// Low-level interface.
|
||||
//===--------------------------------------------------------------------===//
|
||||
|
Reference in New Issue
Block a user