[PATCH] D21189: Create subranges for new intervals resulting from live interval splitting

Krzysztof Parzyszek via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 28 07:13:37 PDT 2016


kparzysz added inline comments.

================
Comment at: lib/CodeGen/LiveRangeCalc.cpp:229
@@ -207,3 +228,3 @@
     // reading Reg multiple times. That is OK, extend() is idempotent.
-    extend(LR, UseIdx, Reg);
+    extend(LR, UseIdx, Reg, AllowUndef);
   }
----------------
yakush wrote:
> why LaneBitmask can be omitted in this call of ::extend?
This calls LiveRangeCalc::extend, which does not take a LaneBitmask argument.  It does not scan the code, it performs the extension based only on the LiveRange.

================
Comment at: lib/CodeGen/LiveRangeCalc.cpp:230
@@ -209,2 +229,3 @@
+    extend(LR, UseIdx, Reg, AllowUndef);
   }
 }
----------------
It does not have to be concerned about it.  It takes a live range LR and a slot index Use, to which the LR needs to be extended.  Whether the extension is the right thing to do should be checked by the caller.

================
Comment at: lib/CodeGen/LiveRangeCalc.cpp:389
@@ -300,3 +388,3 @@
     if (TargetRegisterInfo::isPhysicalRegister(PhysReg) &&
         !MBB->isLiveIn(PhysReg)) {
       MBB->getParent()->verify();
----------------
yakush wrote:
> code assumes PhysReg here can't be sub-registers. if livein contains super-register and PhysReg is sub-register, it will fail?
The physical register liveness is handled a bit differently, and I haven't looked at that code in detail.  At the first glance it appears as if this code could fail, but since it has never happened for me, I'm guessing that this case is taken care of somewhere else.


Repository:
  rL LLVM

https://reviews.llvm.org/D21189





More information about the llvm-commits mailing list