Skip to content

Commit 34b8ee8

Browse files
bcheng0127igcbot
authored andcommitted
Remove the WAR predicate dependence
HW can cover this kind dependence
1 parent 109a9e7 commit 34b8ee8

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

visa/HWCaps.inc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -926,6 +926,10 @@ bool needA0WAR() const {
926926
return (getPlatform() >= Xe2);
927927
}
928928

929+
bool needPredicateWAR() const {
930+
return (getPlatform() < Xe3);
931+
}
932+
929933
bool alwaysAllowGlobalFlagOpt() const {
930934
// We shouldn't add this kind of ugly platform check. However, there's
931935
// a complicated bug found in TGLLP when disabling a flagopt case. There

visa/LocalScheduler/SWSB_G4IR.cpp

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6101,8 +6101,12 @@ bool G4_BB_SB::getGRFFootPrint(SBNode *node, PointsToAnalysis &p) {
61016101
for (G4_INST *inst : node->instVec) {
61026102
hasDistOneAReg |=
61036103
getGRFFootPrintOperands(node, inst, Opnd_src0, Opnd_src4, p);
6104-
hasDistOneAReg |=
6105-
getGRFFootPrintOperands(node, inst, Opnd_pred, Opnd_implAccDst, p);
6104+
if (builder.needPredicateWAR())
6105+
hasDistOneAReg |=
6106+
getGRFFootPrintOperands(node, inst, Opnd_pred, Opnd_implAccDst, p);
6107+
else
6108+
hasDistOneAReg |=
6109+
getGRFFootPrintOperands(node, inst, Opnd_condMod, Opnd_implAccDst, p);
61066110
hasDistOneAReg |=
61076111
getGRFFootPrintOperands(node, inst, Opnd_dst, Opnd_dst, p);
61086112
}
@@ -6116,7 +6120,12 @@ void G4_BB_SB::getGRFBucketDescs(SBNode *node, std::vector<SBBucketDesc> &BDvec,
61166120
// scan order is src0, src1, src2, src3, src4, dst
61176121
getGRFBucketsForOperands(node, Opnd_src0, Opnd_src4, BDvec, GRFOnly);
61186122
if (!GRFOnly) {
6119-
getGRFBucketsForOperands(node, Opnd_pred, Opnd_implAccDst, BDvec, GRFOnly);
6123+
if (builder.needPredicateWAR())
6124+
getGRFBucketsForOperands(node, Opnd_pred, Opnd_implAccDst, BDvec,
6125+
GRFOnly);
6126+
else
6127+
getGRFBucketsForOperands(node, Opnd_condMod, Opnd_implAccDst, BDvec,
6128+
GRFOnly);
61206129
}
61216130
getGRFBucketsForOperands(node, Opnd_dst, Opnd_dst, BDvec, GRFOnly);
61226131

0 commit comments

Comments
 (0)