mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-19 19:29:31 +00:00
Fix bug in PhyRegAlloc::setCallInterferences() handling call through a
null pointer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16013 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ac9edd5faa
commit
f1b7eb145e
@ -204,8 +204,9 @@ void PhyRegAlloc::setCallInterferences(const MachineInstr *MInst,
|
|||||||
// That has a call interference because it conflicts with outgoing args.
|
// That has a call interference because it conflicts with outgoing args.
|
||||||
if (const Value *AddrVal = argDesc->getIndirectFuncPtr()) {
|
if (const Value *AddrVal = argDesc->getIndirectFuncPtr()) {
|
||||||
LiveRange *AddrValLR = LRI->getLiveRangeForValue( AddrVal );
|
LiveRange *AddrValLR = LRI->getLiveRangeForValue( AddrVal );
|
||||||
assert( AddrValLR && "No LR for indirect addr val of call");
|
// LR can be null if the function pointer is a constant.
|
||||||
AddrValLR->setCallInterference();
|
if (AddrValLR)
|
||||||
|
AddrValLR->setCallInterference();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user