Skip to content

Commit 452ea7b

Browse files
bcheng0127igcbot
authored andcommitted
Enable Linear Scan RA by default to test
Enable Linear Scan RA by default to test
1 parent 766d068 commit 452ea7b

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

visa/LinearScanRA.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1551,8 +1551,7 @@ void LinearScanRA::calculateCurrentBBLiveIntervals(
15511551
liveIntervals.push_back(stackCallRetLR);
15521552
stackCallRetLR->setPushed(true);
15531553
}
1554-
if (arg && argSize > 0 && arg->getRegVar()) {
1555-
vASSERT(stackCallArgLR);
1554+
if (stackCallArgLR && arg && argSize > 0 && arg->getRegVar()) {
15561555
stackCallArgLR->setLastRef(
15571556
curInst, curInst->getLexicalId() * 2 -
15581557
1); // Minus one so that arguments will not be spilled

visa/LocalRA.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2021,6 +2021,15 @@ void PhyRegsLocalRA::markPhyRegs(G4_Declare *topdcl) {
20212021
for (unsigned int i = 0; i < numwords; i++) {
20222022
// Starting from first word, mark each consecutive word busy
20232023
setWordBusy(regnum, (subRegInWord + i));
2024+
2025+
//In case across one GRF
2026+
if (subRegInWord + i >= builder.numEltPerGRF<Type_UW>()) {
2027+
regnum++;
2028+
if (!isGRFAvailable(regnum)) {
2029+
break;
2030+
}
2031+
i = 0;
2032+
}
20242033
}
20252034
}
20262035
} else {

0 commit comments

Comments
 (0)