Skip to content

Commit 15a6af4

Browse files
sys-igcigcbot
authored andcommitted
[Autobackout][FunctionalRegression]Revert of change: 3a919a3: indirect send update
indirect send update
1 parent 9901bac commit 15a6af4

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

visa/Optimizer.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -828,6 +828,11 @@ void Optimizer::s0SubAfterRA() {
828828
return;
829829
}
830830

831+
// for 512 GRF mode, indirect-send is forbidden
832+
if (builder.kernel.getNumRegTotal() == 512) {
833+
return;
834+
}
835+
831836
kernel.fg.resetLocalDataFlowData();
832837
kernel.fg.localDataFlowAnalysis();
833838

visa/Passes/SRSubstitution.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -582,18 +582,17 @@ bool SRSubPassBeforeRA::isSRCandidateBeforeRA(G4_INST *inst,
582582
//if opndNum + offset is defined multiple times, cannobe be removed
583583
G4_Operand *dst = movInst->getDst();
584584
unsigned offset = dst->getLeftBound() / builder.getGRFSize();
585-
// The source opndNum of send instruction which was defined
586-
Gen4_Operand_Number opndNum = (*I).second;
587-
585+
Gen4_Operand_Number opndNum =
586+
(*I).second; // The source opndNum of send instruction which was defined
588587
if (isRemoveAble(movInst)) {
589588
auto iter = std::find_if(
590589
dstSrcRegs.dstSrcMap.begin(), dstSrcRegs.dstSrcMap.end(),
591590
[opndNum, offset](regMapBRA regmap) {
592591
return regmap.opndNum == opndNum &&
593592
regmap.offset == offset;
594593
});
595-
// if multiple defined, cannot be removed
596-
if (iter != dstSrcRegs.dstSrcMap.end()) {
594+
if (iter !=
595+
dstSrcRegs.dstSrcMap.end()) { // multiple define, cannot be removed
597596
notRemoveableMap.push_back(std::make_pair(opndNum, offset));
598597
} else {
599598
G4_Operand *src = movInst->getSrc(0);

0 commit comments

Comments
 (0)