Skip to content

Commit 8dd709c

Browse files
bcheng0127igcbot
authored andcommitted
[Autobackout][FuncReg]Revert of change: a2d9ca0
localRA: Fix bug when input variable occupies EOT registers Local RA cannot handle the EOT live range interference, because EOT variables are handled seperately. The solution is the if EOT register is occupied by input variable, fail local RA and use global RA to handle. Global RA can do spill/fill to the EOT variables.
1 parent 985efa1 commit 8dd709c

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

visa/LocalRA.cpp

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -676,31 +676,6 @@ bool LocalRA::assignUniqueRegisters(bool twoBanksRA, bool twoDirectionsAssign,
676676
if (dclLR && dclLR->isEOT() && builder.hasEOTGRFBinding()) {
677677
// For EOT use r112 - r127
678678
// for simplicity we assign each EOT source unique GRFs
679-
int rows = dcl->getNumRows();
680-
bool found = false;
681-
while (nextEOTGRF + rows <= kernel.getNumRegTotal()) {
682-
bool isGood = true;
683-
for (int i = 0; i < dcl->getNumRows(); i++) {
684-
// Only handle it when the register is available.
685-
// If occupied by input, it will only be set busy.
686-
// If not avaialable(Such as vISA_Debug) keep the old way.
687-
if (pregs->isGRFAvailable(nextEOTGRF + i)) {
688-
if (pregs->isGRFBusy(nextEOTGRF + i)) {
689-
nextEOTGRF = nextEOTGRF + i + 1;
690-
isGood = false;
691-
break;
692-
}
693-
}
694-
}
695-
if (isGood) {
696-
found = true;
697-
break;
698-
}
699-
}
700-
if (!found) {
701-
return true;
702-
}
703-
704679
G4_Greg *phyReg = builder.phyregpool.getGreg(nextEOTGRF);
705680
dcl->getRegVar()->setPhyReg(phyReg, 0);
706681
dclLR->setPhyReg(phyReg, 0);

0 commit comments

Comments
 (0)