diff options
author | Matthias Braun <matze@braunis.de> | 2016-05-31 22:38:06 +0000 |
---|---|---|
committer | Matthias Braun <matze@braunis.de> | 2016-05-31 22:38:06 +0000 |
commit | f9acacaa928d7ba9db900c42893c244fb19714c4 (patch) | |
tree | 7a44766e0781f8f4342fb62db6a84f38009bd976 /llvm/lib/CodeGen/LiveIntervalAnalysis.cpp | |
parent | cbb1d06ff2476e01a66908bcfdfa6058c5a4bfbd (diff) | |
download | llvm-f9acacaa928d7ba9db900c42893c244fb19714c4.zip llvm-f9acacaa928d7ba9db900c42893c244fb19714c4.tar.gz llvm-f9acacaa928d7ba9db900c42893c244fb19714c4.tar.bz2 |
CodeGen: Refactor renameDisconnectedComponents() as a pass
Refactor LiveIntervals::renameDisconnectedComponents() to be a pass.
Also change the name to "RenameIndependentSubregs":
- renameDisconnectedComponents() worked on a MachineFunction at a time
so it is a natural candidate for a machine function pass.
- The algorithm is testable with a .mir test now.
- This also fixes a problem where the lazy renaming as part of the
MachineScheduler introduced IMPLICIT_DEF instructions after the number
of a nodes in a region were counted leading to a mismatch.
Differential Revision: http://reviews.llvm.org/D20507
llvm-svn: 271345
Diffstat (limited to 'llvm/lib/CodeGen/LiveIntervalAnalysis.cpp')
-rw-r--r-- | llvm/lib/CodeGen/LiveIntervalAnalysis.cpp | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp index 2358b0e..622b9c2 100644 --- a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp +++ b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp @@ -1566,22 +1566,6 @@ void LiveIntervals::splitSeparateComponents(LiveInterval &LI, ConEQ.Distribute(LI, SplitLIs.data(), *MRI); } -void LiveIntervals::renameDisconnectedComponents() { - ConnectedSubRegClasses SubRegClasses(*this, *MRI, *TII); - - // Iterate over all vregs. Note that we query getNumVirtRegs() the newly - // created vregs end up with higher numbers but do not need to be visited as - // there can't be any further splitting. - for (size_t I = 0, E = MRI->getNumVirtRegs(); I < E; ++I) { - unsigned Reg = TargetRegisterInfo::index2VirtReg(I); - LiveInterval *LI = VirtRegIntervals[Reg]; - if (LI == nullptr || !LI->hasSubRanges()) - continue; - - SubRegClasses.renameComponents(*LI); - } -} - void LiveIntervals::constructMainRangeFromSubranges(LiveInterval &LI) { assert(LRCalc && "LRCalc not initialized."); LRCalc->reset(MF, getSlotIndexes(), DomTree, &getVNInfoAllocator()); |