Skip to content

Commit 1b59692

Browse files
bcheng0127igcbot
authored andcommitted
Changes in code.
1 parent 832cfe5 commit 1b59692

File tree

2 files changed

+1
-28
lines changed

2 files changed

+1
-28
lines changed

visa/LocalRA.cpp

+1-27
Original file line numberDiff line numberDiff line change
@@ -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-
573548
void 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

visa/LocalRA.h

-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ namespace vISA
6666
void trivialAssignRA(bool& needGlobalRA, bool threeSourceCandidate);
6767
bool localRAPass(bool doRoundRobin, bool doSplitLLR);
6868
void resetMasks();
69-
unsigned int getLargestInputGRF();
7069
void blockOutputPhyRegs();
7170
void removeUnrequiredLifetimeOps();
7271
bool assignUniqueRegisters(bool twoBanksRA, bool twoDirectionsAssign, bool hybridWithSpill);

0 commit comments

Comments
 (0)