mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Check all overlaps when looking for used registers.
A function using any RC alias is enough to enable the ExeDepsFix pass. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144636 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -650,10 +650,11 @@ bool ExeDepsFix::runOnMachineFunction(MachineFunction &mf) {
|
|||||||
bool anyregs = false;
|
bool anyregs = false;
|
||||||
for (TargetRegisterClass::const_iterator I = RC->begin(), E = RC->end();
|
for (TargetRegisterClass::const_iterator I = RC->begin(), E = RC->end();
|
||||||
I != E; ++I)
|
I != E; ++I)
|
||||||
if (MF->getRegInfo().isPhysRegUsed(*I)) {
|
for (const unsigned *AI = TRI->getOverlaps(*I); *AI; ++AI)
|
||||||
anyregs = true;
|
if (MF->getRegInfo().isPhysRegUsed(*AI)) {
|
||||||
break;
|
anyregs = true;
|
||||||
}
|
break;
|
||||||
|
}
|
||||||
if (!anyregs) return false;
|
if (!anyregs) return false;
|
||||||
|
|
||||||
// Initialize the AliasMap on the first use.
|
// Initialize the AliasMap on the first use.
|
||||||
|
Reference in New Issue
Block a user