Skip to content

Commit 3a6e828

Browse files
anikaushikigcbot
authored andcommitted
[Autobackout][FuncReg]Revert of change: 7ed739a
Enable copy propagation of operands with send instructions IGC currently does not allow copy propagation of operands between mov and send instructions. Enabling this can result in performance improvement through reduction of instruction count; instruction count is reduced through elimination of mov instructions.
1 parent 14994c6 commit 3a6e828

File tree

1 file changed

+5
-23
lines changed

1 file changed

+5
-23
lines changed

visa/G4_IR.cpp

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1866,29 +1866,11 @@ bool G4_INST::canPropagateTo(G4_INST *useInst, Gen4_Operand_Number opndNum,
18661866
}
18671867
}
18681868

1869-
// allow copy propagation with send instruction under following conditions
1870-
// 1. src operand is not an immediate value
1871-
// 2. src and dst have same type and # of elements
1872-
// 3. src is grf aligned
1873-
if ((opndNum == Opnd_src0 && useInst->isSend()) ||
1874-
(opndNum == Opnd_src1 && useInst->isSplitSend())) {
1875-
1876-
// check platform gen; apply this optimization only for Gen11 and beyond
1877-
// due to HW restriction where src0 and src1 operands must not overlap
1878-
if (getBuilder().getPlatformGeneration() < PlatformGen::GEN11) {
1879-
return false;
1880-
}
1881-
if (src->isImm()) return false;
1882-
if (src->getTopDcl()->getNumElems() != dst->getTopDcl()->getNumElems())
1883-
return false;
1884-
if (MT != G4_INST::Copy) return false;
1885-
// EOT messages have specific constraints on register range for src0, src1
1886-
// for now, do not do copy propaation on src0, src1 for eot sends
1887-
if (useInst->isEOT()) return false;
1888-
// Check alignment last as isOpndAligned will change the alignment
1889-
if (!getBuilder().tryToAlignOperand(src, getBuilder().numEltPerGRF<Type_UB>())) {
1890-
return false;
1891-
}
1869+
// The following are copied from local dataflow analysis.
1870+
// TODO: re-examine..
1871+
if (((opndNum == Opnd_src0 && useInst->isSend()) && !statelessAddr) ||
1872+
(opndNum == Opnd_src1 && useInst->isSplitSend())) {
1873+
return false;
18921874
}
18931875

18941876
auto isFloatPseudoMAD = [](G4_INST *inst) {

0 commit comments

Comments
 (0)