diff options
author | Dan Gohman <gohman@apple.com> | 2009-09-25 22:26:13 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-09-25 22:26:13 +0000 |
commit | 2bf0649e053d1589689d2e4cf32c7bf1e5e6ae12 (patch) | |
tree | f0f224b0c81e02a0b5ffb8f68ebfa89ce645e01c /lib/CodeGen/RegAllocLinearScan.cpp | |
parent | 29438d13e036cb454b2089b8e175fc93f62bbba2 (diff) | |
download | external_llvm-2bf0649e053d1589689d2e4cf32c7bf1e5e6ae12.zip external_llvm-2bf0649e053d1589689d2e4cf32c7bf1e5e6ae12.tar.gz external_llvm-2bf0649e053d1589689d2e4cf32c7bf1e5e6ae12.tar.bz2 |
Simplify a few more uses of reg_iterator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82812 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/RegAllocLinearScan.cpp')
-rw-r--r-- | lib/CodeGen/RegAllocLinearScan.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/CodeGen/RegAllocLinearScan.cpp b/lib/CodeGen/RegAllocLinearScan.cpp index 64490d2..9d22e13 100644 --- a/lib/CodeGen/RegAllocLinearScan.cpp +++ b/lib/CodeGen/RegAllocLinearScan.cpp @@ -397,10 +397,10 @@ unsigned RALinScan::attemptTrivialCoalescing(LiveInterval &cur, unsigned Reg) { // Remove unnecessary kills since a copy does not clobber the register. if (li_->hasInterval(SrcReg)) { LiveInterval &SrcLI = li_->getInterval(SrcReg); - for (MachineRegisterInfo::reg_iterator I = mri_->reg_begin(cur.reg), - E = mri_->reg_end(); I != E; ++I) { + for (MachineRegisterInfo::use_iterator I = mri_->use_begin(cur.reg), + E = mri_->use_end(); I != E; ++I) { MachineOperand &O = I.getOperand(); - if (!O.isUse() || !O.isKill()) + if (!O.isKill()) continue; MachineInstr *MI = &*I; if (SrcLI.liveAt(li_->getDefIndex(li_->getInstructionIndex(MI)))) |