Skip to content

Commit 3a919a3

Browse files
bcheng0127igcbot
authored andcommitted
indirect send update
indirect send update
1 parent 5415e63 commit 3a919a3

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-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: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -582,17 +582,18 @@ 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-
Gen4_Operand_Number opndNum =
586-
(*I).second; // The source opndNum of send instruction which was defined
585+
// The source opndNum of send instruction which was defined
586+
Gen4_Operand_Number opndNum = (*I).second;
587+
587588
if (isRemoveAble(movInst)) {
588589
auto iter = std::find_if(
589590
dstSrcRegs.dstSrcMap.begin(), dstSrcRegs.dstSrcMap.end(),
590591
[opndNum, offset](regMapBRA regmap) {
591592
return regmap.opndNum == opndNum &&
592593
regmap.offset == offset;
593594
});
594-
if (iter !=
595-
dstSrcRegs.dstSrcMap.end()) { // multiple define, cannot be removed
595+
// if multiple defined, cannot be removed
596+
if (iter != dstSrcRegs.dstSrcMap.end()) {
596597
notRemoveableMap.push_back(std::make_pair(opndNum, offset));
597598
} else {
598599
G4_Operand *src = movInst->getSrc(0);

0 commit comments

Comments
 (0)