summaryrefslogtreecommitdiff
path: root/lib/CodeGen/LiveRegMatrix.cpp
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2013-10-10 21:29:02 +0000
committerMatthias Braun <matze@braunis.de>2013-10-10 21:29:02 +0000
commit4f3b5e8c9232e43d1291aab8db5f5698d7ee0ea4 (patch)
tree8476f80c09b3a75334a62dc0ee6b7be53f8b5cdc /lib/CodeGen/LiveRegMatrix.cpp
parente25dde550baec1f79caf2fc06edd74e7ae6ffa33 (diff)
downloadllvm-4f3b5e8c9232e43d1291aab8db5f5698d7ee0ea4.tar.gz
llvm-4f3b5e8c9232e43d1291aab8db5f5698d7ee0ea4.tar.bz2
llvm-4f3b5e8c9232e43d1291aab8db5f5698d7ee0ea4.tar.xz
Represent RegUnit liveness with LiveRange instance
Previously LiveInterval has been used, but having a spill weight and register number is unnecessary for a register unit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192397 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/LiveRegMatrix.cpp')
-rw-r--r--lib/CodeGen/LiveRegMatrix.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/CodeGen/LiveRegMatrix.cpp b/lib/CodeGen/LiveRegMatrix.cpp
index 0ef069f478..1d801ac914 100644
--- a/lib/CodeGen/LiveRegMatrix.cpp
+++ b/lib/CodeGen/LiveRegMatrix.cpp
@@ -119,9 +119,11 @@ bool LiveRegMatrix::checkRegUnitInterference(LiveInterval &VirtReg,
if (VirtReg.empty())
return false;
CoalescerPair CP(VirtReg.reg, PhysReg, *TRI);
- for (MCRegUnitIterator Units(PhysReg, TRI); Units.isValid(); ++Units)
- if (VirtReg.overlaps(LIS->getRegUnit(*Units), CP, *LIS->getSlotIndexes()))
+ for (MCRegUnitIterator Units(PhysReg, TRI); Units.isValid(); ++Units) {
+ const LiveRange &UnitRange = LIS->getRegUnit(*Units);
+ if (VirtReg.overlaps(UnitRange, CP, *LIS->getSlotIndexes()))
return true;
+ }
return false;
}