summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit34e1be94519594a4afd7bbf7ec11fd86ce0c86de (patch)
treeafce265c18d39bfd6433e27c35ac5091588451d6 /llvm/lib/CodeGen/LiveRegMatrix.cpp
parent2d5c32b3b50510d5f91c6c11d5bcf20f652b8b11 (diff)
downloadbcm5719-llvm-34e1be94519594a4afd7bbf7ec11fd86ce0c86de.tar.gz
bcm5719-llvm-34e1be94519594a4afd7bbf7ec11fd86ce0c86de.zip
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. llvm-svn: 192397
Diffstat (limited to 'llvm/lib/CodeGen/LiveRegMatrix.cpp')
-rw-r--r--llvm/lib/CodeGen/LiveRegMatrix.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/LiveRegMatrix.cpp b/llvm/lib/CodeGen/LiveRegMatrix.cpp
index 0ef069f4782..1d801ac914a 100644
--- a/llvm/lib/CodeGen/LiveRegMatrix.cpp
+++ b/llvm/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;
}
OpenPOWER on IntegriCloud