Skip to content

Commit c8a7ccf

Browse files
pratikasharigcbot
authored andcommitted
Check whether G4_RegVar is GRF when marking busy in local RA
Local RA allocates GRF variables only. When a variable is marked as live-in and live-out, we need to mark it in appropriate local RA data structures so those GRFs are never used for assignment. Check whether G4_RegVar is GRF when marking busy in local RA.
1 parent d56734f commit c8a7ccf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

visa/LocalRA.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2104,7 +2104,7 @@ void PhyRegsLocalRA::markPhyRegs(G4_Declare *topdcl) {
21042104
unsigned numwords = 0;
21052105
unsigned int regnum = 0;
21062106

2107-
if (rvar->getPhyReg() == nullptr) {
2107+
if (!rvar->getPhyReg() || !rvar->isGreg()) {
21082108
return;
21092109
}
21102110
// Calculate number of physical registers required by this dcl

0 commit comments

Comments
 (0)