summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2012-06-22 17:49:44 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2012-06-22 17:49:44 +0000
commite6d21144054c7b7e0445307f58f703b08d189d75 (patch)
tree8bd4b68cee83b389164c958673e839482c3fc622
parent360713ec947ca6af3e8c75d5f254a274f4453175 (diff)
downloadllvm-e6d21144054c7b7e0445307f58f703b08d189d75.tar.gz
llvm-e6d21144054c7b7e0445307f58f703b08d189d75.tar.bz2
llvm-e6d21144054c7b7e0445307f58f703b08d189d75.tar.xz
Remove some redundant LIS->hasInterval() checks.
These functions only operate on virtual registers now, and they all have live ranges. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159015 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/RegisterCoalescer.cpp22
1 files changed, 0 insertions, 22 deletions
diff --git a/lib/CodeGen/RegisterCoalescer.cpp b/lib/CodeGen/RegisterCoalescer.cpp
index 4f30277317..7ef525d9f3 100644
--- a/lib/CodeGen/RegisterCoalescer.cpp
+++ b/lib/CodeGen/RegisterCoalescer.cpp
@@ -398,11 +398,6 @@ bool RegisterCoalescer::adjustCopiesBackFrom(const CoalescerPair &CP,
assert(!CP.isPartial() && "This doesn't work for partial copies.");
assert(!CP.isPhys() && "This doesn't work for physreg copies.");
- // Bail if there is no dst interval - can happen when merging physical subreg
- // operations.
- if (!LIS->hasInterval(CP.getDstReg()))
- return false;
-
LiveInterval &IntA =
LIS->getInterval(CP.isFlipped() ? CP.getDstReg() : CP.getSrcReg());
LiveInterval &IntB =
@@ -464,19 +459,6 @@ bool RegisterCoalescer::adjustCopiesBackFrom(const CoalescerPair &CP,
// two value numbers.
IntB.addRange(LiveRange(FillerStart, FillerEnd, BValNo));
- // If the IntB live range is assigned to a physical register, and if that
- // physreg has sub-registers, update their live intervals as well.
- if (TargetRegisterInfo::isPhysicalRegister(IntB.reg)) {
- for (MCSubRegIterator SR(IntB.reg, TRI); SR.isValid(); ++SR) {
- if (!LIS->hasInterval(*SR))
- continue;
- LiveInterval &SRLI = LIS->getInterval(*SR);
- SRLI.addRange(LiveRange(FillerStart, FillerEnd,
- SRLI.getNextValue(FillerStart,
- LIS->getVNInfoAllocator())));
- }
- }
-
// Okay, merge "B1" into the same value number as "B0".
if (BValNo != ValLR->valno) {
// If B1 is killed by a PHI, then the merged live range must also be killed
@@ -558,10 +540,6 @@ bool RegisterCoalescer::removeCopyByCommutingDef(const CoalescerPair &CP,
MachineInstr *CopyMI) {
assert (!CP.isPhys());
- // Bail if there is no dst interval.
- if (!LIS->hasInterval(CP.getDstReg()))
- return false;
-
SlotIndex CopyIdx = LIS->getInstructionIndex(CopyMI).getRegSlot();
LiveInterval &IntA =