@@ -4913,10 +4913,6 @@ void GlobalRA::saveRestoreA0(G4_BB * bb)
4913
4913
{
4914
4914
auto addrSpill = a0SaveMov ();
4915
4915
bb->insertBefore (instIt, addrSpill);
4916
- if (EUFusionWANeeded ())
4917
- {
4918
- addEUFusionWAInsts (bb, addrSpill);
4919
- }
4920
4916
}
4921
4917
auto a0SSO = a0SSOMove ();
4922
4918
bb->insertBefore (instIt, a0SSO);
@@ -4928,10 +4924,6 @@ void GlobalRA::saveRestoreA0(G4_BB * bb)
4928
4924
// restore A0
4929
4925
auto addrFill = a0RestoreMov ();
4930
4926
bb->insertBefore (instIt, addrFill);
4931
- if (EUFusionWANeeded ())
4932
- {
4933
- addEUFusionWAInsts (bb, addrFill);
4934
- }
4935
4927
hasActiveSpillFill = false ;
4936
4928
}
4937
4929
}
@@ -5146,13 +5138,8 @@ void GlobalRA::expandSpillLSC(G4_BB* bb, INST_LIST_ITER& instIt)
5146
5138
if (getEUFusionWAInsts ().count (inst) > 0 )
5147
5139
{
5148
5140
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);
5156
5143
}
5157
5144
5158
5145
splice (bb, instIt, builder->instList , inst->getCISAOff ());
@@ -5234,13 +5221,8 @@ void GlobalRA::expandFillLSC(G4_BB* bb, INST_LIST_ITER& instIt)
5234
5221
if (getEUFusionWAInsts ().count (inst) > 0 )
5235
5222
{
5236
5223
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);
5244
5226
}
5245
5227
5246
5228
splice (bb, instIt, builder->instList , inst->getCISAOff ());
@@ -5289,11 +5271,6 @@ void GlobalRA::expandSpillNonStackcall(
5289
5271
msgDesc, extDesc);
5290
5272
}
5291
5273
instIt = bb->insertBefore (instIt, sendInst);
5292
- if (EUFusionWANeeded () &&
5293
- sendInst->isWriteEnableInst ())
5294
- {
5295
- addEUFusionWAInsts (bb, sendInst);
5296
- }
5297
5274
}
5298
5275
else
5299
5276
{
@@ -5321,12 +5298,6 @@ void GlobalRA::expandSpillNonStackcall(
5321
5298
5322
5299
instIt = bb->insertBefore (instIt, sendInst);
5323
5300
5324
- if (EUFusionWANeeded () &&
5325
- sendInst->isWriteEnableInst ())
5326
- {
5327
- addEUFusionWAInsts (bb, sendInst);
5328
- }
5329
-
5330
5301
numRows -= getPayloadSizeGRF (numRows);
5331
5302
offset += getPayloadSizeGRF (numRows);
5332
5303
rowOffset += getPayloadSizeGRF (numRows);
@@ -5426,6 +5397,14 @@ void GlobalRA::expandSpillStackcall(
5426
5397
5427
5398
bb->insertBefore (spillIt, spillSends);
5428
5399
5400
+ if (getEUFusionWAInsts ().count (inst) > 0 )
5401
+ {
5402
+ removeEUFusionWAInst (inst);
5403
+ addEUFusionWAInsts (spillSends);
5404
+ if (hdrSetInst)
5405
+ addEUFusionWAInsts (hdrSetInst);
5406
+ }
5407
+
5429
5408
if (kernel.getOption (vISA_GenerateDebugInfo))
5430
5409
{
5431
5410
kernel.getKernelDebugInfo ()->updateExpandedIntrinsic (inst->asSpillIntrinsic (), hdrSetInst);
@@ -5529,12 +5508,6 @@ void GlobalRA::expandSpillIntrinsic(G4_BB* bb)
5529
5508
InstOpt_WriteEnable, msgDesc);
5530
5509
}
5531
5510
instIt = bb->insertBefore (instIt, sendInst);
5532
-
5533
- if (EUFusionWANeeded () &&
5534
- sendInst->isWriteEnableInst ())
5535
- {
5536
- addEUFusionWAInsts (bb, sendInst);
5537
- }
5538
5511
}
5539
5512
else
5540
5513
{
@@ -5563,12 +5536,6 @@ void GlobalRA::expandSpillIntrinsic(G4_BB* bb)
5563
5536
5564
5537
instIt = bb->insertBefore (instIt, sendInst);
5565
5538
5566
- if (EUFusionWANeeded () &&
5567
- sendInst->isWriteEnableInst ())
5568
- {
5569
- addEUFusionWAInsts (bb, sendInst);
5570
- }
5571
-
5572
5539
numRows -= getPayloadSizeGRF (numRows);
5573
5540
offset += getPayloadSizeGRF (numRows);
5574
5541
rowOffset += getPayloadSizeGRF (numRows);
@@ -5663,6 +5630,14 @@ void GlobalRA::expandFillStackcall(uint32_t numRows, uint32_t offset, short rowO
5663
5630
5664
5631
auto fillSends = createOwordFill (respSizeInOwords, fillDst);
5665
5632
5633
+ if (getEUFusionWAInsts ().count (inst) > 0 )
5634
+ {
5635
+ removeEUFusionWAInst (inst);
5636
+ addEUFusionWAInsts (fillSends);
5637
+ if (hdrSetInst)
5638
+ addEUFusionWAInsts (hdrSetInst);
5639
+ }
5640
+
5666
5641
std::stringstream comments;
5667
5642
comments << " stack fill: " << resultRgn->getTopDcl ()->getName () << " from FP[" << inst->asFillIntrinsic ()->getOffset () << " x32]" ;
5668
5643
fillSends->addComment (comments.str ());
0 commit comments