[llvm] r371802 - Temporarily revert r371640 "LiveIntervals: Split live intervals on multiple dead defs".

Tim Shen via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 12 18:34:25 PDT 2019


Author: timshen
Date: Thu Sep 12 18:34:25 2019
New Revision: 371802

URL: http://llvm.org/viewvc/llvm-project?rev=371802&view=rev
Log:
Temporarily revert r371640 "LiveIntervals: Split live intervals on multiple dead defs".

It reveals a miscompile on Hexagon. See PR43302 for details.

Removed:
    llvm/trunk/test/CodeGen/AMDGPU/live-intervals-multiple-dead-defs.mir
Modified:
    llvm/trunk/lib/CodeGen/LiveIntervals.cpp

Modified: llvm/trunk/lib/CodeGen/LiveIntervals.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveIntervals.cpp?rev=371802&r1=371801&r2=371802&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/LiveIntervals.cpp (original)
+++ llvm/trunk/lib/CodeGen/LiveIntervals.cpp Thu Sep 12 18:34:25 2019
@@ -196,11 +196,7 @@ void LiveIntervals::computeVirtRegInterv
   assert(LI.empty() && "Should only compute empty intervals.");
   LRCalc->reset(MF, getSlotIndexes(), DomTree, &getVNInfoAllocator());
   LRCalc->calculate(LI, MRI->shouldTrackSubRegLiveness(LI.reg));
-
-  if (computeDeadValues(LI, nullptr)) {
-    SmallVector<LiveInterval *, 4> SplitIntervals;
-    splitSeparateComponents(LI, SplitIntervals);
-  }
+  computeDeadValues(LI, nullptr);
 }
 
 void LiveIntervals::computeVirtRegs() {
@@ -504,8 +500,6 @@ bool LiveIntervals::shrinkToUses(LiveInt
 bool LiveIntervals::computeDeadValues(LiveInterval &LI,
                                       SmallVectorImpl<MachineInstr*> *dead) {
   bool MayHaveSplitComponents = false;
-  bool HaveDeadDef = false;
-
   for (VNInfo *VNI : LI.valnos) {
     if (VNI->isUnused())
       continue;
@@ -536,10 +530,6 @@ bool LiveIntervals::computeDeadValues(Li
       MachineInstr *MI = getInstructionFromIndex(Def);
       assert(MI && "No instruction defining live value");
       MI->addRegisterDead(LI.reg, TRI);
-      if (HaveDeadDef)
-        MayHaveSplitComponents = true;
-      HaveDeadDef = true;
-
       if (dead && MI->allDefsAreDead()) {
         LLVM_DEBUG(dbgs() << "All defs dead: " << Def << '\t' << *MI);
         dead->push_back(MI);

Removed: llvm/trunk/test/CodeGen/AMDGPU/live-intervals-multiple-dead-defs.mir
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/AMDGPU/live-intervals-multiple-dead-defs.mir?rev=371801&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/AMDGPU/live-intervals-multiple-dead-defs.mir (original)
+++ llvm/trunk/test/CodeGen/AMDGPU/live-intervals-multiple-dead-defs.mir (removed)
@@ -1,18 +0,0 @@
-# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
-# RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx906 -verify-machineinstrs -run-pass=machine-scheduler -verify-misched -o - %s | FileCheck %s
-
-# There are multiple dead defs of the same virtual register. Make sure
-# the intervals are split during the initial live range computation.
-
----
-name:            multiple_connected_components_dead
-tracksRegLiveness: true
-body:             |
-  bb.0:
-    ; CHECK-LABEL: name: multiple_connected_components_dead
-    ; CHECK: dead %1:vgpr_32 = V_MOV_B32_e32 0, implicit $exec
-    ; CHECK: dead %0:vgpr_32 = V_MOV_B32_e32 1, implicit $exec
-    dead %0:vgpr_32 = V_MOV_B32_e32 0, implicit $exec
-    dead %0:vgpr_32 = V_MOV_B32_e32 1, implicit $exec
-
-...




More information about the llvm-commits mailing list