summaryrefslogtreecommitdiff
path: root/lib/CodeGen/LiveIntervalAnalysis.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2011-04-11 18:08:10 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2011-04-11 18:08:10 +0000
commit0fb215a154a5f9f54eea1ce8b006ba9bce5defa1 (patch)
treed8ea2b1a2a5dd3477191b55ec6535ac4de09ded6 /lib/CodeGen/LiveIntervalAnalysis.cpp
parent11983cd861614cd5593c628268542d2688bbe15a (diff)
downloadllvm-0fb215a154a5f9f54eea1ce8b006ba9bce5defa1.tar.gz
llvm-0fb215a154a5f9f54eea1ce8b006ba9bce5defa1.tar.bz2
llvm-0fb215a154a5f9f54eea1ce8b006ba9bce5defa1.tar.xz
Don't add live ranges for sub-registers when clobbering a physical register.
Both coalescing and register allocation already check aliases for interference, so these extra segments are only slowing us down. This speeds up both linear scan and the greedy register allocator. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129283 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/LiveIntervalAnalysis.cpp')
-rw-r--r--lib/CodeGen/LiveIntervalAnalysis.cpp7
1 files changed, 0 insertions, 7 deletions
diff --git a/lib/CodeGen/LiveIntervalAnalysis.cpp b/lib/CodeGen/LiveIntervalAnalysis.cpp
index c77ae1b7a7..7a8ca63ce7 100644
--- a/lib/CodeGen/LiveIntervalAnalysis.cpp
+++ b/lib/CodeGen/LiveIntervalAnalysis.cpp
@@ -578,13 +578,6 @@ void LiveIntervals::handleRegisterDef(MachineBasicBlock *MBB,
CopyMI = MI;
handlePhysicalRegisterDef(MBB, MI, MIIdx, MO,
getOrCreateInterval(MO.getReg()), CopyMI);
- // Def of a register also defines its sub-registers.
- for (const unsigned* AS = tri_->getSubRegisters(MO.getReg()); *AS; ++AS)
- // If MI also modifies the sub-register explicitly, avoid processing it
- // more than once. Do not pass in TRI here so it checks for exact match.
- if (!MI->definesRegister(*AS))
- handlePhysicalRegisterDef(MBB, MI, MIIdx, MO,
- getOrCreateInterval(*AS), 0);
}
}