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 | e603710d11fbf9afde1b26de794820897ed5a976 (patch) | |
tree | 2e240e2636a24a2bede346ad2dca562cfffdf927 /llvm/lib/CodeGen/RegAllocLinearScan.cpp | |
parent | 5edd45a76b5a701d526c704c25200f39e8d32fe2 (diff) | |
download | bcm5719-llvm-e603710d11fbf9afde1b26de794820897ed5a976.tar.gz bcm5719-llvm-e603710d11fbf9afde1b26de794820897ed5a976.zip |
Simplify a few more uses of reg_iterator.
llvm-svn: 82812
Diffstat (limited to 'llvm/lib/CodeGen/RegAllocLinearScan.cpp')
-rw-r--r-- | llvm/lib/CodeGen/RegAllocLinearScan.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/RegAllocLinearScan.cpp b/llvm/lib/CodeGen/RegAllocLinearScan.cpp index 64490d2e05e..9d22e13bb5d 100644 --- a/llvm/lib/CodeGen/RegAllocLinearScan.cpp +++ b/llvm/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)))) |