diff options
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/include/llvm/CodeGen/TailDuplicator.h | 1 | ||||
| -rw-r--r-- | llvm/lib/CodeGen/TailDuplicator.cpp | 18 |
2 files changed, 0 insertions, 19 deletions
diff --git a/llvm/include/llvm/CodeGen/TailDuplicator.h b/llvm/include/llvm/CodeGen/TailDuplicator.h index 7c70fbfceca..8e65199418a 100644 --- a/llvm/include/llvm/CodeGen/TailDuplicator.h +++ b/llvm/include/llvm/CodeGen/TailDuplicator.h @@ -33,7 +33,6 @@ class TailDuplicator { const MachineBranchProbabilityInfo *MBPI; const MachineModuleInfo *MMI; MachineRegisterInfo *MRI; - std::unique_ptr<RegScavenger> RS; bool PreRegAlloc; // A list of virtual registers for which to update SSA form. diff --git a/llvm/lib/CodeGen/TailDuplicator.cpp b/llvm/lib/CodeGen/TailDuplicator.cpp index 05421ac64a4..3c122358fd0 100644 --- a/llvm/lib/CodeGen/TailDuplicator.cpp +++ b/llvm/lib/CodeGen/TailDuplicator.cpp @@ -67,10 +67,6 @@ void TailDuplicator::initMF(MachineFunction &MF, const MachineModuleInfo *MMIin, assert(MBPI != nullptr && "Machine Branch Probability Info required"); PreRegAlloc = MRI->isSSA(); - RS.reset(); - - if (MRI->tracksLiveness() && TRI->trackLivenessAfterRegAlloc(MF)) - RS.reset(new RegScavenger()); } static void VerifyPHIs(MachineFunction &MF, bool CheckExtra) { @@ -770,20 +766,6 @@ bool TailDuplicator::tailDuplicate(MachineFunction &MF, bool IsSimple, // Remove PredBB's unconditional branch. TII->RemoveBranch(*PredBB); - if (RS && !TailBB->livein_empty()) { - // Update PredBB livein. - RS->enterBasicBlock(*PredBB); - if (!PredBB->empty()) - RS->forward(std::prev(PredBB->end())); - for (const auto &LI : TailBB->liveins()) { - if (!RS->isRegUsed(LI.PhysReg, false)) - // If a register is previously livein to the tail but it's not live - // at the end of predecessor BB, then it should be added to its - // livein list. - PredBB->addLiveIn(LI); - } - } - // Clone the contents of TailBB into PredBB. DenseMap<unsigned, RegSubRegPair> LocalVRMap; SmallVector<std::pair<unsigned, RegSubRegPair>, 4> CopyInfos; |

