[PATCH] D157086: [LiveRange] Remove inaccurate verification of live-in PhysRegs

Carl Ritson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 4 05:07:07 PDT 2023


critson created this revision.
critson added reviewers: foad, arsenm, qcolombet, MatzeB.
Herald added subscribers: StephenFan, hiraditya.
Herald added a project: All.
critson requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.

Remove verification that a PhysReg is live in to an MBB.
isLiveIn does not handle reg units, so cannot identify when a
register would be defined because its super register is partially
defined.
Additionally a PhysReg may be partial defined at block entry and
then fully defined before any use.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D157086

Files:
  llvm/lib/CodeGen/LiveRangeCalc.cpp


Index: llvm/lib/CodeGen/LiveRangeCalc.cpp
===================================================================
--- llvm/lib/CodeGen/LiveRangeCalc.cpp
+++ llvm/lib/CodeGen/LiveRangeCalc.cpp
@@ -216,15 +216,6 @@
         errs() << Use << " " << *MI;
       report_fatal_error("Use not jointly dominated by defs.");
     }
-
-    if (Register::isPhysicalRegister(PhysReg) && !MBB->isLiveIn(PhysReg)) {
-      MBB->getParent()->verify();
-      const TargetRegisterInfo *TRI = MRI->getTargetRegisterInfo();
-      errs() << "The register " << printReg(PhysReg, TRI)
-             << " needs to be live in to " << printMBBReference(*MBB)
-             << ", but is missing from the live-in list.\n";
-      report_fatal_error("Invalid global physical register");
-    }
 #endif
     FoundUndef |= MBB->pred_empty();
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D157086.547170.patch
Type: text/x-patch
Size: 812 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230804/585600ec/attachment.bin>


More information about the llvm-commits mailing list