[llvm-dev] Check for isConstantPhysReg() in bool LiveRangeCalc::findReachingDefs

Great Indian Bison via llvm-dev llvm-dev at lists.llvm.org
Sat Feb 13 20:53:24 PST 2021


Hello LLVMDevs,
Should following code in bool LiveRangeCalc::findReachingDefs() check for isConstantPhysReg()?
Or there is a code which should prevent error below to hit for constant physical register?

2 if (Register::isPhysicalRegister(PhysReg) && !MBB->isLiveIn(PhysReg)) {
1 MBB->getParent()->verify();
225 const TargetRegisterInfo *TRI = MRI->getTargetRegisterInfo();
1 errs() << "The register " << printReg(PhysReg, TRI)
2 << " needs to be live in to " << printMBBReference(*MBB)
3 << ", but is missing from the live-in list.\n";
4 report_fatal_error("Invalid global physical register");
5 }

Thanks!
GI Bison.

Sent with [ProtonMail](https://protonmail.com) Secure Email.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210214/5344249c/attachment.html>


More information about the llvm-dev mailing list