@@ -545,31 +545,6 @@ void LocalRA::resetMasks()
545
545
}
546
546
}
547
547
548
- unsigned int LocalRA::getLargestInputGRF ()
549
- {
550
- unsigned int largestInput = 0 ;
551
-
552
- for (auto dcl : kernel.Declares )
553
- {
554
- // Find out the largest GRF regsiter occupied by input variable
555
- // In case overlap with reserved registers
556
- if ((dcl->getRegFile () == G4_INPUT || dcl->isLiveIn ()) &&
557
- dcl->isOutput () == false &&
558
- !(dcl->getRegVar ()->isAreg ()) &&
559
- dcl->getRegVar ()->isPhyRegAssigned ())
560
- {
561
- G4_RegVar* var = dcl->getRegVar ();
562
- unsigned int regNum = var->getPhyReg ()->asGreg ()->getRegNum ();
563
- unsigned int regOff = var->getPhyRegOff ();
564
- unsigned int largestGRF = (regNum * kernel.numEltPerGRF <Type_UW>() +
565
- (regOff * dcl->getElemSize ()) / G4_WSIZE + dcl->getWordSize () - 1 ) / (kernel.numEltPerGRF <Type_UW>());
566
- largestInput = largestInput < largestGRF ? largestGRF : largestInput;
567
- }
568
- }
569
-
570
- return largestInput;
571
- }
572
-
573
548
void LocalRA::blockOutputPhyRegs ()
574
549
{
575
550
for (auto dcl : kernel.Declares )
@@ -794,8 +769,7 @@ bool LocalRA::assignUniqueRegisters(bool twoBanksRA, bool twoDirectionsAssign, b
794
769
std::unordered_set<unsigned int > emptyForbidden;
795
770
auto varSplitPass = gra.getVarSplitPass ();
796
771
797
- unsigned int largestInput = getLargestInputGRF ();
798
- if (((nextEOTGRF < (kernel.getNumRegTotal () - 16 )) || (nextEOTGRF < largestInput)) && builder.hasEOTGRFBinding () )
772
+ if (nextEOTGRF < 112 && builder.hasEOTGRFBinding ())
799
773
{
800
774
// we can't guarantee unique assignments for all the EOT sources
801
775
// punt to global RA
0 commit comments