@@ -545,31 +545,6 @@ void LocalRA::resetMasks()
545545 }
546546}
547547
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-
573548void LocalRA::blockOutputPhyRegs ()
574549{
575550 for (auto dcl : kernel.Declares )
@@ -794,8 +769,7 @@ bool LocalRA::assignUniqueRegisters(bool twoBanksRA, bool twoDirectionsAssign, b
794769 std::unordered_set<unsigned int > emptyForbidden;
795770 auto varSplitPass = gra.getVarSplitPass ();
796771
797- unsigned int largestInput = getLargestInputGRF ();
798- if (((nextEOTGRF < (kernel.getNumRegTotal () - 16 )) || (nextEOTGRF < largestInput)) && builder.hasEOTGRFBinding () )
772+ if (nextEOTGRF < 112 && builder.hasEOTGRFBinding ())
799773 {
800774 // we can't guarantee unique assignments for all the EOT sources
801775 // punt to global RA
0 commit comments