File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -10249,8 +10249,19 @@ bool GlobalRA::hybridRA(LocalRA &lra) {
10249
10249
<< rpe.getMaxRP () << " \n " );
10250
10250
kernel.Declares .resize (numOrigDcl);
10251
10251
lra.undoLocalRAAssignments (false );
10252
- // Restore alignment in case LRA modified it
10253
- copyAlignment ();
10252
+ // We check src/dst overlap WA because here to keep intf graph simple.
10253
+ // When LRA is run, it sets augmentation alignment conservatively so
10254
+ // that LRA assignments can co-exist with HRA assignments after
10255
+ // augmentation is run. If we reset alignment here, it means that
10256
+ // augmentation buckets are reset and alignment is copied over
10257
+ // from original G4_Declare. This is correct behavior. However, when
10258
+ // avoidSrcDstOverlap WA sees that src/dst of an instruction have no
10259
+ // alignment, it forces an interference edge between them. This causes
10260
+ // extra interferences in graph compared to case when we use conservative
10261
+ // alignment computed in LRA. So when the WA is enabled, we avoid
10262
+ // resetting alignment as it may produce better code.
10263
+ if (!builder.avoidDstSrcOverlap () || use4GRFAlign)
10264
+ copyAlignment ();
10254
10265
return false ;
10255
10266
}
10256
10267
You can’t perform that action at this time.
0 commit comments