diff options
| author | Matthias Braun <matze@braunis.de> | 2015-07-14 17:52:07 +0000 |
|---|---|---|
| committer | Matthias Braun <matze@braunis.de> | 2015-07-14 17:52:07 +0000 |
| commit | 9912bb817cef9d1829acb4baec4a27b7eaf5b610 (patch) | |
| tree | fd24e6d6cd0c74144197fefd9b612624eafa5043 /llvm/lib/CodeGen/ExecutionDepsFix.cpp | |
| parent | 092c475e250af64e7b9ba459067d43cb71fb6dfd (diff) | |
| download | bcm5719-llvm-9912bb817cef9d1829acb4baec4a27b7eaf5b610.tar.gz bcm5719-llvm-9912bb817cef9d1829acb4baec4a27b7eaf5b610.zip | |
MachineRegisterInfo: Remove UsedPhysReg infrastructure
We have a detailed def/use lists for every physical register in
MachineRegisterInfo anyway, so there is little use in maintaining an
additional bitset of which ones are used.
Removing it frees us from extra book keeping. This simplifies
VirtRegMap.
Differential Revision: http://reviews.llvm.org/D10911
llvm-svn: 242173
Diffstat (limited to 'llvm/lib/CodeGen/ExecutionDepsFix.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/ExecutionDepsFix.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/ExecutionDepsFix.cpp b/llvm/lib/CodeGen/ExecutionDepsFix.cpp index 5b09cf1a0fd..201f9c15008 100644 --- a/llvm/lib/CodeGen/ExecutionDepsFix.cpp +++ b/llvm/lib/CodeGen/ExecutionDepsFix.cpp @@ -733,12 +733,14 @@ bool ExeDepsFix::runOnMachineFunction(MachineFunction &mf) { // If no relevant registers are used in the function, we can skip it // completely. bool anyregs = false; + const MachineRegisterInfo &MRI = mf.getRegInfo(); for (TargetRegisterClass::const_iterator I = RC->begin(), E = RC->end(); - I != E; ++I) - if (MF->getRegInfo().isPhysRegUsed(*I)) { - anyregs = true; - break; - } + I != E && !anyregs; ++I) + for (MCRegAliasIterator AI(*I, TRI, true); AI.isValid(); ++AI) + if (!MRI.reg_nodbg_empty(*AI)) { + anyregs = true; + break; + } if (!anyregs) return false; // Initialize the AliasMap on the first use. |

