Skip to content

Commit 21fcf90

Browse files
bcheng0127igcbot
authored andcommitted
Enable round robin RA for address register
Enable round robin RA for address register to reduce WAR dependence from address register
1 parent 4b5b508 commit 21fcf90

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

visa/GraphColor.cpp

+7-2
Original file line numberDiff line numberDiff line change
@@ -7755,8 +7755,13 @@ bool GraphColor::regAlloc(bool doBankConflictReduction,
77557755
assignColors(FIRST_FIT);
77567756
}
77577757
} else {
7758-
// assign registers for ARFs using a first-fit heuristic
7759-
assignColors(FIRST_FIT, false, false);
7758+
// assign registers for ARFs using a round-robin heuristic
7759+
// For address register, there is no fragment issue
7760+
if (builder.needA0WAR()) {
7761+
assignColors(ROUND_ROBIN, false, false);
7762+
} else {
7763+
assignColors(FIRST_FIT, false, false);
7764+
}
77607765
}
77617766

77627767
return (requireSpillCode() == false);

0 commit comments

Comments
 (0)