mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-18 11:24:01 +00:00
In CheckForLiveRegDef use TRI->getOverlaps.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122473 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -659,15 +659,18 @@ static void CheckForLiveRegDef(SUnit *SU, unsigned Reg,
|
|||||||
SmallSet<unsigned, 4> &RegAdded,
|
SmallSet<unsigned, 4> &RegAdded,
|
||||||
SmallVector<unsigned, 4> &LRegs,
|
SmallVector<unsigned, 4> &LRegs,
|
||||||
const TargetRegisterInfo *TRI) {
|
const TargetRegisterInfo *TRI) {
|
||||||
if (LiveRegDefs[Reg] && LiveRegDefs[Reg] != SU) {
|
for (const unsigned *AliasI = TRI->getOverlaps(Reg); *AliasI; ++AliasI) {
|
||||||
|
|
||||||
|
// Check if Ref is live.
|
||||||
|
if (!LiveRegDefs[Reg]) continue;
|
||||||
|
|
||||||
|
// Allow multiple uses of the same def.
|
||||||
|
if (LiveRegDefs[Reg] == SU) continue;
|
||||||
|
|
||||||
|
// Add Reg to the set of interfering live regs.
|
||||||
if (RegAdded.insert(Reg))
|
if (RegAdded.insert(Reg))
|
||||||
LRegs.push_back(Reg);
|
LRegs.push_back(Reg);
|
||||||
}
|
}
|
||||||
for (const unsigned *Alias = TRI->getAliasSet(Reg); *Alias; ++Alias)
|
|
||||||
if (LiveRegDefs[*Alias] && LiveRegDefs[*Alias] != SU) {
|
|
||||||
if (RegAdded.insert(*Alias))
|
|
||||||
LRegs.push_back(*Alias);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// DelayForLiveRegsBottomUp - Returns true if it is necessary to delay
|
/// DelayForLiveRegsBottomUp - Returns true if it is necessary to delay
|
||||||
|
Reference in New Issue
Block a user