Skip to content

Commit f977421

Browse files
petechouigcbot
authored andcommitted
dpas macro refactor.
dpas macro refactor.
1 parent f16806b commit f977421

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

visa/LocalScheduler/SWSB_G4IR.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6140,20 +6140,20 @@ void G4_BB_SB::footprintMerge(SBNode *node, const SBNode *nextNode) {
61406140
bool G4_BB_SB::hasInternalDependenceWithinDPAS(SBNode *node) const {
61416141
const SBFootprint *dstfp = node->getFirstFootprint(Opnd_dst);
61426142

6143+
auto isDstSrc0DepException = [&](const SBFootprint *dstfp,
6144+
const SBFootprint *src0fp) -> bool {
6145+
return dstfp->LeftB == src0fp->LeftB && dstfp->RightB == src0fp->RightB;
6146+
};
6147+
61436148
for (Gen4_Operand_Number opndNum :
61446149
{Opnd_src0, Opnd_src1, Opnd_src2, Opnd_src3, Opnd_src4}) {
61456150
const SBFootprint *srcfp = node->getFirstFootprint(opndNum);
61466151
unsigned short internalOffset = 0;
61476152
if (dstfp->hasOverlap(srcfp, internalOffset)) {
6148-
61496153
// It's allowed that dst and src0 share same registers (not internal dep).
61506154
// But not including partial overlap.
6151-
if (opndNum == Opnd_src0) {
6152-
if ((dstfp->LeftB == srcfp->LeftB) &&
6153-
(dstfp->RightB == srcfp->RightB)) {
6154-
continue;
6155-
}
6156-
}
6155+
if (opndNum == Opnd_src0 && isDstSrc0DepException(dstfp, srcfp))
6156+
continue;
61576157
return true;
61586158
}
61596159
}

0 commit comments

Comments
 (0)