mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 04:30:12 +00:00
Handle reserved registers more accurately in handleMove().
Reserved register live ranges look like a set of dead defs - any uses of reserved registers are ignored. Instead of skipping the updating of reserved register operands entirely, just ignore the use operands and treat the def operands normally. No test case, handleMove() is not commonly used yet. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165060 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
95707c90cc
commit
d4919a988d
@ -1164,18 +1164,17 @@ private:
|
||||
|
||||
unsigned Reg = MO.getReg();
|
||||
|
||||
// TODO: Currently we're skipping uses that are reserved or have no
|
||||
// interval, but we're not updating their kills. This should be
|
||||
// fixed.
|
||||
if (TargetRegisterInfo::isPhysicalRegister(Reg) && LIS.isReserved(Reg))
|
||||
continue;
|
||||
// Don't track uses of reserved registers - they're not accurate.
|
||||
// Reserved register live ranges look like a set of dead defs.
|
||||
bool Resv =
|
||||
TargetRegisterInfo::isPhysicalRegister(Reg) && LIS.isReserved(Reg);
|
||||
|
||||
// Collect ranges for register units. These live ranges are computed on
|
||||
// demand, so just skip any that haven't been computed yet.
|
||||
if (TargetRegisterInfo::isPhysicalRegister(Reg)) {
|
||||
for (MCRegUnitIterator Units(Reg, &TRI); Units.isValid(); ++Units)
|
||||
if (LiveInterval *LI = LIS.getCachedRegUnit(*Units))
|
||||
collectRanges(MO, LI, Entering, Internal, Exiting, OldIdx);
|
||||
collectRanges(MO, LI, Entering, Internal, Exiting, OldIdx, Resv);
|
||||
} else {
|
||||
// Collect ranges for individual virtual registers.
|
||||
collectRanges(MO, &LIS.getInterval(Reg),
|
||||
@ -1186,8 +1185,8 @@ private:
|
||||
|
||||
void collectRanges(const MachineOperand &MO, LiveInterval *LI,
|
||||
RangeSet &Entering, RangeSet &Internal, RangeSet &Exiting,
|
||||
SlotIndex OldIdx) {
|
||||
if (MO.readsReg()) {
|
||||
SlotIndex OldIdx, bool IgnoreReads = false) {
|
||||
if (!IgnoreReads && MO.readsReg()) {
|
||||
LiveRange* LR = LI->getLiveRangeContaining(OldIdx);
|
||||
if (LR != 0)
|
||||
Entering.insert(std::make_pair(LI, LR));
|
||||
|
Loading…
Reference in New Issue
Block a user