diff options
| author | Dan Gohman <gohman@apple.com> | 2007-10-03 19:26:29 +0000 |
|---|---|---|
| committer | Dan Gohman <gohman@apple.com> | 2007-10-03 19:26:29 +0000 |
| commit | c731c97facb5ff56daceb724d75f1f14e8d01f39 (patch) | |
| tree | 700408f7fbcfb3dd5005afb0399dff630d61948b /llvm/lib/CodeGen/LiveIntervalAnalysis.cpp | |
| parent | 8c43e41d9bf388195d4b1f32b569193c77ca404a (diff) | |
| download | bcm5719-llvm-c731c97facb5ff56daceb724d75f1f14e8d01f39.tar.gz bcm5719-llvm-c731c97facb5ff56daceb724d75f1f14e8d01f39.zip | |
Use empty() member functions when that's what's being tested for instead
of comparing begin() and end().
llvm-svn: 42585
Diffstat (limited to 'llvm/lib/CodeGen/LiveIntervalAnalysis.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/LiveIntervalAnalysis.cpp | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp index e7abd47f536..88eeff7605a 100644 --- a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp +++ b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp @@ -817,17 +817,15 @@ void LiveIntervals::computeIntervals() { MachineBasicBlock::iterator MI = MBB->begin(), miEnd = MBB->end(); - if (MBB->livein_begin() != MBB->livein_end()) { - // Create intervals for live-ins to this BB first. - for (MachineBasicBlock::const_livein_iterator LI = MBB->livein_begin(), - LE = MBB->livein_end(); LI != LE; ++LI) { - handleLiveInRegister(MBB, MIIndex, getOrCreateInterval(*LI)); - // Multiple live-ins can alias the same register. - for (const unsigned* AS = mri_->getSubRegisters(*LI); *AS; ++AS) - if (!hasInterval(*AS)) - handleLiveInRegister(MBB, MIIndex, getOrCreateInterval(*AS), - true); - } + // Create intervals for live-ins to this BB first. + for (MachineBasicBlock::const_livein_iterator LI = MBB->livein_begin(), + LE = MBB->livein_end(); LI != LE; ++LI) { + handleLiveInRegister(MBB, MIIndex, getOrCreateInterval(*LI)); + // Multiple live-ins can alias the same register. + for (const unsigned* AS = mri_->getSubRegisters(*LI); *AS; ++AS) + if (!hasInterval(*AS)) + handleLiveInRegister(MBB, MIIndex, getOrCreateInterval(*AS), + true); } for (; MI != miEnd; ++MI) { |

