Skip to content

Commit c27da1b

Browse files
bcheng0127igcbot
authored andcommitted
indirect send update
indirect send update
1 parent 15a6af4 commit c27da1b

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

visa/Optimizer.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -828,11 +828,6 @@ 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-
836831
kernel.fg.resetLocalDataFlowData();
837832
kernel.fg.localDataFlowAnalysis();
838833

visa/Passes/SRSubstitution.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,7 @@ bool SRSubPassBeforeRA::isSRCandidateBeforeRA(G4_INST *inst,
478478
return false;
479479
}
480480

481+
481482
int movInstNum = 0;
482483
int32_t firstDefID = 0x7FFFFFFF; // the ID of the first instruction define the
483484
std::vector<std::pair<Gen4_Operand_Number, unsigned>> notRemoveableMap;
@@ -582,17 +583,18 @@ bool SRSubPassBeforeRA::isSRCandidateBeforeRA(G4_INST *inst,
582583
//if opndNum + offset is defined multiple times, cannobe be removed
583584
G4_Operand *dst = movInst->getDst();
584585
unsigned offset = dst->getLeftBound() / builder.getGRFSize();
585-
Gen4_Operand_Number opndNum =
586-
(*I).second; // The source opndNum of send instruction which was defined
586+
// The source opndNum of send instruction which was defined
587+
Gen4_Operand_Number opndNum = (*I).second;
588+
587589
if (isRemoveAble(movInst)) {
588590
auto iter = std::find_if(
589591
dstSrcRegs.dstSrcMap.begin(), dstSrcRegs.dstSrcMap.end(),
590592
[opndNum, offset](regMapBRA regmap) {
591593
return regmap.opndNum == opndNum &&
592594
regmap.offset == offset;
593595
});
594-
if (iter !=
595-
dstSrcRegs.dstSrcMap.end()) { // multiple define, cannot be removed
596+
// if multiple defined, cannot be removed
597+
if (iter != dstSrcRegs.dstSrcMap.end()) {
596598
notRemoveableMap.push_back(std::make_pair(opndNum, offset));
597599
} else {
598600
G4_Operand *src = movInst->getSrc(0);

0 commit comments

Comments
 (0)