[llvm-dev] Check for isConstantPhysReg() in bool LiveRangeCalc::findReachingDefs
Björn Pettersson A via llvm-dev
llvm-dev at lists.llvm.org
Sun Feb 14 08:24:53 PST 2021
> -----Original Message-----
> From: llvm-dev <llvm-dev-bounces at lists.llvm.org> On Behalf Of Great
> Indian Bison via llvm-dev
> Sent: den 14 februari 2021 05:53
> To: llvm-dev at lists.llvm.org
> Subject: [llvm-dev] Check for isConstantPhysReg() in bool
> LiveRangeCalc::findReachingDefs
>
> 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?
Not sure, but maybe it is assumed that a constant physical register also
should be defined as being "reserved". And if I recall it correctly
liveness isn't calculated for reserved registers.
>
> 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 https://protonmail.com Secure Email.
More information about the llvm-dev
mailing list