@@ -962,7 +962,7 @@ int LinearScanRA::linearScanRA()
962
962
PhyRegsLocalRA initPregs = (*pregs);
963
963
calculateInputIntervalsGlobal (initPregs, (*regions.begin ()).second );
964
964
#ifdef DEBUG_VERBOSE_ON
965
- COUT_ERROR << " ===== printInputLiveIntervalsGlobal============" << std::endl;
965
+ COUT_ERROR << " ===== printInputLiveIntervalsGlobal============" << kernel. getName () << std::endl;
966
966
printInputLiveIntervalsGlobal ();
967
967
#endif
968
968
@@ -1246,7 +1246,7 @@ void LinearScanRA::setDstReferences(G4_BB* bb, INST_LIST_ITER inst_it, G4_Declar
1246
1246
}
1247
1247
1248
1248
if (lr == nullptr ||
1249
- (dcl->getRegFile () == G4_INPUT && dcl != kernel.fg .builder ->getStackCallArg ())||
1249
+ (dcl->getRegFile () == G4_INPUT && dcl != kernel.fg .builder ->getStackCallArg () && dcl != kernel. fg . builder -> getStackCallRet () )||
1250
1250
(lr->isGRFRegAssigned () && (!dcl->getRegVar ()->isGreg ()))) // ARF
1251
1251
{
1252
1252
return ;
@@ -1337,7 +1337,7 @@ void LinearScanRA::setSrcReferences(G4_BB* bb, INST_LIST_ITER inst_it, int srcId
1337
1337
}
1338
1338
1339
1339
if (lr == nullptr ||
1340
- (dcl->getRegFile () == G4_INPUT && dcl != kernel.fg .builder ->getStackCallRet ()) ||
1340
+ (dcl->getRegFile () == G4_INPUT && dcl != kernel.fg .builder ->getStackCallRet () && dcl != kernel. fg . builder -> getStackCallArg () ) ||
1341
1341
(lr->isGRFRegAssigned () && (!dcl->getRegVar ()->isGreg ()))) // ARF
1342
1342
{
1343
1343
return ;
@@ -1654,9 +1654,8 @@ void LinearScanRA::calculateCurrentBBLiveIntervals(G4_BB* bb, std::vector<LSLive
1654
1654
if (curInst->isFReturn ())
1655
1655
{
1656
1656
uint16_t retSize = kernel.fg .builder ->getRetVarSize ();
1657
- if (retSize)
1657
+ if (retSize && stackCallRetLR )
1658
1658
{
1659
- assert (stackCallRetLR);
1660
1659
stackCallRetLR->setLastRef (curInst, curInst->getLexicalId () * 2 );
1661
1660
stackCallRetLR = nullptr ;
1662
1661
}
0 commit comments