summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/RegAllocLinearScan.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-09-25 22:26:13 +0000
committerDan Gohman <gohman@apple.com>2009-09-25 22:26:13 +0000
commite603710d11fbf9afde1b26de794820897ed5a976 (patch)
tree2e240e2636a24a2bede346ad2dca562cfffdf927 /llvm/lib/CodeGen/RegAllocLinearScan.cpp
parent5edd45a76b5a701d526c704c25200f39e8d32fe2 (diff)
downloadbcm5719-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.cpp6
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))))
OpenPOWER on IntegriCloud