aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/RegAllocLocal.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2008-03-05 00:59:57 +0000
committerEvan Cheng <evan.cheng@apple.com>2008-03-05 00:59:57 +0000
commit6130f66eaae89f8878590796977678afa8448926 (patch)
tree9e0d41836f9fcae91af847f9483fcc3cb0ca780c /lib/CodeGen/RegAllocLocal.cpp
parent4d519457d1ee72d14d62a5823b03449dc0e3df6e (diff)
downloadexternal_llvm-6130f66eaae89f8878590796977678afa8448926.zip
external_llvm-6130f66eaae89f8878590796977678afa8448926.tar.gz
external_llvm-6130f66eaae89f8878590796977678afa8448926.tar.bz2
Refactor code. Remove duplicated functions that basically do the same thing as
findRegisterUseOperandIdx, findRegisterDefOperandIndx. Fix some naming inconsistencies. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47927 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/RegAllocLocal.cpp')
-rw-r--r--lib/CodeGen/RegAllocLocal.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/CodeGen/RegAllocLocal.cpp b/lib/CodeGen/RegAllocLocal.cpp
index 9e27454..5eceae4 100644
--- a/lib/CodeGen/RegAllocLocal.cpp
+++ b/lib/CodeGen/RegAllocLocal.cpp
@@ -306,8 +306,7 @@ void RALocal::spillVirtReg(MachineBasicBlock &MBB,
// If the instruction reads the register that's spilled, (e.g. this can
// happen if it is a move to a physical register), then the spill
// instruction is not a kill.
- bool isKill = !(I != MBB.end() &&
- I->findRegisterUseOperandIdx(PhysReg) != -1);
+ bool isKill = !(I != MBB.end() && I->readsRegister(PhysReg));
TII->storeRegToStackSlot(MBB, I, PhysReg, isKill, FrameIndex, RC);
++NumStores; // Update statistics
}