Move common code into an MRI function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147071 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jakob Stoklund Olesen
2011-12-21 19:50:05 +00:00
parent e6949b1399
commit a2a98fd0dd
4 changed files with 16 additions and 25 deletions

View File

@ -654,11 +654,10 @@ bool ExeDepsFix::runOnMachineFunction(MachineFunction &mf) {
bool anyregs = false;
for (TargetRegisterClass::const_iterator I = RC->begin(), E = RC->end();
I != E; ++I)
for (const unsigned *AI = TRI->getOverlaps(*I); *AI; ++AI)
if (MF->getRegInfo().isPhysRegUsed(*AI)) {
anyregs = true;
break;
}
if (MF->getRegInfo().isPhysRegOrOverlapUsed(*I)) {
anyregs = true;
break;
}
if (!anyregs) return false;
// Initialize the AliasMap on the first use.