[PATCH] D22031: TailDuplicator: Remove live-in updating logic

Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 6 12:02:21 PDT 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL274655: TailDuplicator: Remove live-in updating logic (authored by matze).

Changed prior to commit:
  http://reviews.llvm.org/D22031?vs=62819&id=62931#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D22031

Files:
  llvm/trunk/include/llvm/CodeGen/TailDuplicator.h
  llvm/trunk/lib/CodeGen/TailDuplicator.cpp

Index: llvm/trunk/lib/CodeGen/TailDuplicator.cpp
===================================================================
--- llvm/trunk/lib/CodeGen/TailDuplicator.cpp
+++ llvm/trunk/lib/CodeGen/TailDuplicator.cpp
@@ -67,10 +67,6 @@
   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 @@
     // 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;
Index: llvm/trunk/include/llvm/CodeGen/TailDuplicator.h
===================================================================
--- llvm/trunk/include/llvm/CodeGen/TailDuplicator.h
+++ llvm/trunk/include/llvm/CodeGen/TailDuplicator.h
@@ -33,7 +33,6 @@
   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.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22031.62931.patch
Type: text/x-patch
Size: 1793 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160706/54813061/attachment.bin>


More information about the llvm-commits mailing list