@@ -4913,10 +4913,6 @@ void GlobalRA::saveRestoreA0(G4_BB * bb)
49134913 {
49144914 auto addrSpill = a0SaveMov ();
49154915 bb->insertBefore (instIt, addrSpill);
4916- if (EUFusionWANeeded ())
4917- {
4918- addEUFusionWAInsts (bb, addrSpill);
4919- }
49204916 }
49214917 auto a0SSO = a0SSOMove ();
49224918 bb->insertBefore (instIt, a0SSO);
@@ -4928,10 +4924,6 @@ void GlobalRA::saveRestoreA0(G4_BB * bb)
49284924 // restore A0
49294925 auto addrFill = a0RestoreMov ();
49304926 bb->insertBefore (instIt, addrFill);
4931- if (EUFusionWANeeded ())
4932- {
4933- addEUFusionWAInsts (bb, addrFill);
4934- }
49354927 hasActiveSpillFill = false ;
49364928 }
49374929 }
@@ -5146,13 +5138,8 @@ void GlobalRA::expandSpillLSC(G4_BB* bb, INST_LIST_ITER& instIt)
51465138 if (getEUFusionWAInsts ().count (inst) > 0 )
51475139 {
51485140 removeEUFusionWAInst (inst);
5149- // no WA needed for stack call spill/fill
5150- if (!inst->getFP () &&
5151- inst->isWriteEnableInst ())
5152- {
5153- for (auto inst : builder->instList )
5154- addEUFusionWAInsts (bb, inst);
5155- }
5141+ for (auto inst : builder->instList )
5142+ addEUFusionWAInsts (inst);
51565143 }
51575144
51585145 splice (bb, instIt, builder->instList , inst->getCISAOff ());
@@ -5234,13 +5221,8 @@ void GlobalRA::expandFillLSC(G4_BB* bb, INST_LIST_ITER& instIt)
52345221 if (getEUFusionWAInsts ().count (inst) > 0 )
52355222 {
52365223 removeEUFusionWAInst (inst);
5237- // no WA needed for stack call spill/fill
5238- if (!inst->getFP () &&
5239- inst->isWriteEnableInst ())
5240- {
5241- for (auto inst : builder->instList )
5242- addEUFusionWAInsts (bb, inst);
5243- }
5224+ for (auto inst : builder->instList )
5225+ addEUFusionWAInsts (inst);
52445226 }
52455227
52465228 splice (bb, instIt, builder->instList , inst->getCISAOff ());
@@ -5289,11 +5271,6 @@ void GlobalRA::expandSpillNonStackcall(
52895271 msgDesc, extDesc);
52905272 }
52915273 instIt = bb->insertBefore (instIt, sendInst);
5292- if (EUFusionWANeeded () &&
5293- sendInst->isWriteEnableInst ())
5294- {
5295- addEUFusionWAInsts (bb, sendInst);
5296- }
52975274 }
52985275 else
52995276 {
@@ -5321,12 +5298,6 @@ void GlobalRA::expandSpillNonStackcall(
53215298
53225299 instIt = bb->insertBefore (instIt, sendInst);
53235300
5324- if (EUFusionWANeeded () &&
5325- sendInst->isWriteEnableInst ())
5326- {
5327- addEUFusionWAInsts (bb, sendInst);
5328- }
5329-
53305301 numRows -= getPayloadSizeGRF (numRows);
53315302 offset += getPayloadSizeGRF (numRows);
53325303 rowOffset += getPayloadSizeGRF (numRows);
@@ -5426,6 +5397,14 @@ void GlobalRA::expandSpillStackcall(
54265397
54275398 bb->insertBefore (spillIt, spillSends);
54285399
5400+ if (getEUFusionWAInsts ().count (inst) > 0 )
5401+ {
5402+ removeEUFusionWAInst (inst);
5403+ addEUFusionWAInsts (spillSends);
5404+ if (hdrSetInst)
5405+ addEUFusionWAInsts (hdrSetInst);
5406+ }
5407+
54295408 if (kernel.getOption (vISA_GenerateDebugInfo))
54305409 {
54315410 kernel.getKernelDebugInfo ()->updateExpandedIntrinsic (inst->asSpillIntrinsic (), hdrSetInst);
@@ -5529,12 +5508,6 @@ void GlobalRA::expandSpillIntrinsic(G4_BB* bb)
55295508 InstOpt_WriteEnable, msgDesc);
55305509 }
55315510 instIt = bb->insertBefore (instIt, sendInst);
5532-
5533- if (EUFusionWANeeded () &&
5534- sendInst->isWriteEnableInst ())
5535- {
5536- addEUFusionWAInsts (bb, sendInst);
5537- }
55385511 }
55395512 else
55405513 {
@@ -5563,12 +5536,6 @@ void GlobalRA::expandSpillIntrinsic(G4_BB* bb)
55635536
55645537 instIt = bb->insertBefore (instIt, sendInst);
55655538
5566- if (EUFusionWANeeded () &&
5567- sendInst->isWriteEnableInst ())
5568- {
5569- addEUFusionWAInsts (bb, sendInst);
5570- }
5571-
55725539 numRows -= getPayloadSizeGRF (numRows);
55735540 offset += getPayloadSizeGRF (numRows);
55745541 rowOffset += getPayloadSizeGRF (numRows);
@@ -5663,6 +5630,14 @@ void GlobalRA::expandFillStackcall(uint32_t numRows, uint32_t offset, short rowO
56635630
56645631 auto fillSends = createOwordFill (respSizeInOwords, fillDst);
56655632
5633+ if (getEUFusionWAInsts ().count (inst) > 0 )
5634+ {
5635+ removeEUFusionWAInst (inst);
5636+ addEUFusionWAInsts (fillSends);
5637+ if (hdrSetInst)
5638+ addEUFusionWAInsts (hdrSetInst);
5639+ }
5640+
56665641 std::stringstream comments;
56675642 comments << " stack fill: " << resultRgn->getTopDcl ()->getName () << " from FP[" << inst->asFillIntrinsic ()->getOffset () << " x32]" ;
56685643 fillSends->addComment (comments.str ());
0 commit comments