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

Sergey Yakushkin via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 28 07:24:32 PDT 2016


yakush 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);
   }
----------------
kparzysz wrote:
> 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.
however, findReachingDefs is invoked. it will use full Reg (phys) to report errors - even if LaneBitmask was specifying single sub-register.

================
Comment at: lib/CodeGen/LiveRangeCalc.cpp:389
@@ -300,3 +388,3 @@
     if (TargetRegisterInfo::isPhysicalRegister(PhysReg) &&
         !MBB->isLiveIn(PhysReg)) {
       MBB->getParent()->verify();
----------------
kparzysz wrote:
> 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.
can you suggest where to look? maybe i need to integrate some commits.
in fact, it fails for out of tree compiler (based on llvm 3.8), where we have scalar/vector registers and scalar/vector instructions with PhysReg side-effects annotations.



Repository:
  rL LLVM

https://reviews.llvm.org/D21189





More information about the llvm-commits mailing list