Skip to content

Commit 0e966cf

Browse files
jgu222igcbot
authored andcommitted
REname call WA
Rename EUFusionWA to EUFusionCallWA to refect it is for call wa.
1 parent 6367fe4 commit 0e966cf

File tree

4 files changed

+33
-33
lines changed

4 files changed

+33
-33
lines changed

visa/GraphColor.cpp

+11-11
Original file line numberDiff line numberDiff line change
@@ -6917,10 +6917,10 @@ unsigned GlobalRA::getRegionDisp(
69176917
return rowOffset + columnOffset;
69186918
}
69196919

6920-
void GlobalRA::addEUFusionWAInsts(G4_INST* inst)
6920+
void GlobalRA::addEUFusionCallWAInsts(G4_INST* inst)
69216921
{
6922-
if(EUFusionWANeeded())
6923-
EUFusionWAInsts.insert(inst);
6922+
if(EUFusionCallWANeeded())
6923+
EUFusionCallWAInsts.insert(inst);
69246924
}
69256925

69266926
unsigned GlobalRA::getRegionByteSize(
@@ -7670,14 +7670,14 @@ void GlobalRA::stackCallProlog()
76707670
auto iter = std::find_if(entryBB->begin(), entryBB->end(), [](G4_INST* inst) { return !inst->isLabel(); });
76717671
entryBB->insertBefore(iter, store);
76727672

7673-
if (EUFusionWANeeded())
7673+
if (EUFusionCallWANeeded())
76747674
{
76757675
auto oldSaveInst = builder.getPartFDSaveInst();
76767676
builder.setPartFDSaveInst(store);
76777677
entryBB->remove(oldSaveInst);
76787678
}
76797679

7680-
addEUFusionWAInsts(store);
7680+
addEUFusionCallWAInsts(store);
76817681

76827682
return;
76837683
}
@@ -8371,10 +8371,10 @@ void GlobalRA::addCalleeStackSetupCode()
83718371
builder.kernel.getKernelDebugInfo()->setFrameSize(frameSize * 16);
83728372
}
83738373

8374-
addEUFusionWAInsts(createBEFP);
8375-
addEUFusionWAInsts(addInst);
8374+
addEUFusionCallWAInsts(createBEFP);
8375+
addEUFusionCallWAInsts(addInst);
83768376

8377-
if (EUFusionWANeeded())
8377+
if (EUFusionCallWANeeded())
83788378
{
83798379
builder.kernel.getKernelDebugInfo()->setCallerBEFPSaveInst(createBEFP);
83808380
}
@@ -8696,7 +8696,7 @@ void GlobalRA::addStoreRestoreToReturn()
86968696
auto iter = std::prev(fretBB->end());
86978697
assert((*iter)->isFReturn() && "fret BB must end with fret");
86988698

8699-
if (!EUFusionWANeeded())
8699+
if (!EUFusionCallWANeeded())
87008700
{
87018701
restoreBE_FPInst = builder.createMov(g4::SIMD4, FPdst, oldFPSrc, InstOpt_WriteEnable, false);
87028702
fretBB->insertBefore(iter, restoreBE_FPInst);
@@ -8719,7 +8719,7 @@ void GlobalRA::addStoreRestoreToReturn()
87198719
load = builder.createFill(dstData, G4_ExecSize(execSize), 1, 0, builder.getBEFP(), InstOpt_WriteEnable, false);
87208720
}
87218721
fretBB->insertBefore(iter, load);
8722-
addEUFusionWAInsts(load);
8722+
addEUFusionCallWAInsts(load);
87238723
restoreBE_FPInst = load;
87248724
}
87258725

@@ -8729,7 +8729,7 @@ void GlobalRA::addStoreRestoreToReturn()
87298729
{
87308730
builder.kernel.getKernelDebugInfo()->setCallerBEFPRestoreInst(restoreBE_FPInst);
87318731
builder.kernel.getKernelDebugInfo()->setCallerSPRestoreInst(restoreBE_FPInst);
8732-
if(!EUFusionWANeeded())
8732+
if(!EUFusionCallWANeeded())
87338733
builder.kernel.getKernelDebugInfo()->setCallerBEFPSaveInst(saveBE_FPInst);
87348734
}
87358735

visa/GraphColor.h

+7-7
Original file line numberDiff line numberDiff line change
@@ -690,13 +690,13 @@ namespace vISA
690690
class GlobalRA
691691
{
692692
private:
693-
std::unordered_set<G4_INST*> EUFusionWAInsts;
694-
bool m_EUFusionWANeeded;
693+
std::unordered_set<G4_INST*> EUFusionCallWAInsts;
694+
bool m_EUFusionCallWANeeded;
695695
public:
696-
bool EUFusionWANeeded() const { return m_EUFusionWANeeded; }
697-
void addEUFusionWAInsts(G4_INST* inst);
698-
void removeEUFusionWAInst(G4_INST* inst) { EUFusionWAInsts.erase(inst); }
699-
const std::unordered_set<G4_INST*>& getEUFusionWAInsts() { return EUFusionWAInsts; }
696+
bool EUFusionCallWANeeded() const { return m_EUFusionCallWANeeded; }
697+
void addEUFusionCallWAInsts(G4_INST* inst);
698+
void removeEUFusionCallWAInst(G4_INST* inst) { EUFusionCallWAInsts.erase(inst); }
699+
const std::unordered_set<G4_INST*>& getEUFusionCallWAInsts() { return EUFusionCallWAInsts; }
700700
public:
701701
std::unique_ptr<VerifyAugmentation> verifyAugmentation;
702702
std::unique_ptr<RegChartDump> regChart;
@@ -1204,7 +1204,7 @@ namespace vISA
12041204
}
12051205

12061206
// Need call WA for EU Fusion for non-entry function
1207-
m_EUFusionWANeeded = builder.hasFusedEU()
1207+
m_EUFusionCallWANeeded = builder.hasFusedEU()
12081208
&& builder.getOption(vISA_fusedCallWA)
12091209
&& (kernel.fg.getHasStackCalls() || kernel.hasIndirectCall())
12101210
&& !builder.getIsKernel();

visa/RegAlloc.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -3686,7 +3686,7 @@ int regAlloc(IR_Builder& builder, PhyRegPool& regPool, G4_Kernel& kernel)
36863686
}
36873687

36883688
// printf("EU Fusion WA insts for func: %s\n", kernel.getName());
3689-
for (auto inst : gra.getEUFusionWAInsts())
3689+
for (auto inst : gra.getEUFusionCallWAInsts())
36903690
{
36913691
kernel.setMaskOffset(inst, InstOpt_M16);
36923692
// inst->dump();

visa/SpillManagerGMRF.cpp

+14-14
Original file line numberDiff line numberDiff line change
@@ -5135,11 +5135,11 @@ void GlobalRA::expandSpillLSC(G4_BB* bb, INST_LIST_ITER& instIt)
51355135
spillOffset += numGRFToWrite * getGRFSize();
51365136
}
51375137

5138-
if (getEUFusionWAInsts().count(inst) > 0)
5138+
if (getEUFusionCallWAInsts().count(inst) > 0)
51395139
{
5140-
removeEUFusionWAInst(inst);
5140+
removeEUFusionCallWAInst(inst);
51415141
for (auto inst : builder->instList)
5142-
addEUFusionWAInsts(inst);
5142+
addEUFusionCallWAInsts(inst);
51435143
}
51445144

51455145
splice(bb, instIt, builder->instList, inst->getCISAOff());
@@ -5218,11 +5218,11 @@ void GlobalRA::expandFillLSC(G4_BB* bb, INST_LIST_ITER& instIt)
52185218
fillOffset += responseLength * getGRFSize();
52195219
}
52205220

5221-
if (getEUFusionWAInsts().count(inst) > 0)
5221+
if (getEUFusionCallWAInsts().count(inst) > 0)
52225222
{
5223-
removeEUFusionWAInst(inst);
5223+
removeEUFusionCallWAInst(inst);
52245224
for (auto inst : builder->instList)
5225-
addEUFusionWAInsts(inst);
5225+
addEUFusionCallWAInsts(inst);
52265226
}
52275227

52285228
splice(bb, instIt, builder->instList, inst->getCISAOff());
@@ -5397,12 +5397,12 @@ void GlobalRA::expandSpillStackcall(
53975397

53985398
bb->insertBefore(spillIt, spillSends);
53995399

5400-
if (getEUFusionWAInsts().count(inst) > 0)
5400+
if (getEUFusionCallWAInsts().count(inst) > 0)
54015401
{
5402-
removeEUFusionWAInst(inst);
5403-
addEUFusionWAInsts(spillSends);
5402+
removeEUFusionCallWAInst(inst);
5403+
addEUFusionCallWAInsts(spillSends);
54045404
if (hdrSetInst)
5405-
addEUFusionWAInsts(hdrSetInst);
5405+
addEUFusionCallWAInsts(hdrSetInst);
54065406
}
54075407

54085408
if (kernel.getOption(vISA_GenerateDebugInfo))
@@ -5630,12 +5630,12 @@ void GlobalRA::expandFillStackcall(uint32_t numRows, uint32_t offset, short rowO
56305630

56315631
auto fillSends = createOwordFill(respSizeInOwords, fillDst);
56325632

5633-
if (getEUFusionWAInsts().count(inst) > 0)
5633+
if (getEUFusionCallWAInsts().count(inst) > 0)
56345634
{
5635-
removeEUFusionWAInst(inst);
5636-
addEUFusionWAInsts(fillSends);
5635+
removeEUFusionCallWAInst(inst);
5636+
addEUFusionCallWAInsts(fillSends);
56375637
if (hdrSetInst)
5638-
addEUFusionWAInsts(hdrSetInst);
5638+
addEUFusionCallWAInsts(hdrSetInst);
56395639
}
56405640

56415641
std::stringstream comments;

0 commit comments

Comments
 (0)