Skip to content

Commit 8c7322b

Browse files
bcheng0127igcbot
authored andcommitted
SWSB: track WAR A0 register dependence
Current solution is too conservative, which may affect performance because setting A@1.
1 parent f6c60b6 commit 8c7322b

File tree

3 files changed

+172
-108
lines changed

3 files changed

+172
-108
lines changed

visa/HWCaps.inc

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -459,9 +459,19 @@ G4_Type getMixModeType() const {
459459
// each flag register is 16-bit
460460
uint32_t getNumFlagRegisters(void) { return getPlatform() >= Xe_PVC ? 8 : 4; }
461461

462+
// each address register is 16 bits
462463
uint32_t getNumAddrRegisters() const {
463464
return 16;
464-
}
465+
}
466+
467+
// each address register is 16 bits
468+
uint32_t getNumAddrRegistersInGRFSizeSWSB() const {
469+
if (hasMultipleALUPipes()) {
470+
return ((16 * G4_WSIZE) + numEltPerGRF<Type_UB>() - 1) / numEltPerGRF<Type_UB>();
471+
} else {
472+
return 0;
473+
}
474+
}
465475

466476
uint32_t getNumScalarRegisters(void) {
467477
if (enableSendIndirect()) {
@@ -646,6 +656,8 @@ bool hasLongOperandTypeDepIssue() const {
646656

647657
bool hasFourALUPipes() const { return getPlatform() >= Xe_PVC; }
648658

659+
bool hasMultipleALUPipes() const { return hasThreeALUPipes() || hasFourALUPipes(); };
660+
649661
bool hasFiveALUPipes() const {
650662
return getPlatform() >= Xe2;
651663
}
@@ -725,10 +737,6 @@ bool hasWriteCombine() const {
725737
return getPlatform() >= Xe2;
726738
}
727739

728-
bool hasA0WARHWissue() {
729-
return getPlatform() >= Xe_XeHPSDV;
730-
}
731-
732740
bool hasFtoPackedHFMove() const { return getPlatform() >= Xe_DG2; }
733741

734742
bool hasGather4PO() const { return getPlatform() <= GENX_TGLLP; }

0 commit comments

Comments
 (0)