diff options
| author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-12-21 19:50:05 +0000 |
|---|---|---|
| committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-12-21 19:50:05 +0000 |
| commit | 3588a43e3a3633b41a811aefcf86ae00a5a8e548 (patch) | |
| tree | ab5d700d49099b57523fbfffc50d4d46e35a5751 /llvm/lib/CodeGen | |
| parent | a4b2a86353ef12c7abd4aaffbbfb4ab22d79eea0 (diff) | |
| download | bcm5719-llvm-3588a43e3a3633b41a811aefcf86ae00a5a8e548.tar.gz bcm5719-llvm-3588a43e3a3633b41a811aefcf86ae00a5a8e548.zip | |
Move common code into an MRI function.
llvm-svn: 147071
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/ExecutionDepsFix.cpp | 9 | ||||
| -rw-r--r-- | llvm/lib/CodeGen/PrologEpilogInserter.cpp | 10 |
2 files changed, 5 insertions, 14 deletions
diff --git a/llvm/lib/CodeGen/ExecutionDepsFix.cpp b/llvm/lib/CodeGen/ExecutionDepsFix.cpp index 4ec75cdfec9..c057c1bcdc2 100644 --- a/llvm/lib/CodeGen/ExecutionDepsFix.cpp +++ b/llvm/lib/CodeGen/ExecutionDepsFix.cpp @@ -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. diff --git a/llvm/lib/CodeGen/PrologEpilogInserter.cpp b/llvm/lib/CodeGen/PrologEpilogInserter.cpp index b4fd1cb4f52..dd0a83a90a3 100644 --- a/llvm/lib/CodeGen/PrologEpilogInserter.cpp +++ b/llvm/lib/CodeGen/PrologEpilogInserter.cpp @@ -224,17 +224,9 @@ void PEI::calculateCalleeSavedRegisters(MachineFunction &Fn) { std::vector<CalleeSavedInfo> CSI; for (unsigned i = 0; CSRegs[i]; ++i) { unsigned Reg = CSRegs[i]; - if (Fn.getRegInfo().isPhysRegUsed(Reg)) { + if (Fn.getRegInfo().isPhysRegOrOverlapUsed(Reg)) { // If the reg is modified, save it! CSI.push_back(CalleeSavedInfo(Reg)); - } else { - for (const unsigned *AliasSet = RegInfo->getAliasSet(Reg); - *AliasSet; ++AliasSet) { // Check alias registers too. - if (Fn.getRegInfo().isPhysRegUsed(*AliasSet)) { - CSI.push_back(CalleeSavedInfo(Reg)); - break; - } - } } } |

