Skip to content

Commit d56e799

Browse files
pratikasharigcbot
authored andcommitted
Reduce number of available colors in RA by # of reserved
GRFs in fail safe In fail safe RA, we reserve some number of GRFs to guarantee RA termination. When GRFs are reserved, we must also reduce number of available colors when determining color ordering.
1 parent 420b632 commit d56e799

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

visa/GraphColor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6774,7 +6774,7 @@ void GraphColor::removeConstrained() {
67746774
void GraphColor::determineColorOrdering() {
67756775
numColor = 0;
67766776
if (liveAnalysis.livenessClass(G4_GRF))
6777-
numColor = totalGRFRegCount;
6777+
numColor = totalGRFRegCount - reserveSpillGRFCount;
67786778
else if (liveAnalysis.livenessClass(G4_ADDRESS))
67796779
numColor = builder.getNumAddrRegisters();
67806780
else if (liveAnalysis.livenessClass(G4_FLAG))

0 commit comments

Comments
 (0)