Skip to content

Commit 0f83760

Browse files
fangliu2020igcbot
authored andcommitted
[Autobackout][FuncReg]Revert of change: 25be19b
[IGC vISA] Fix the data flow analysis issue for the case that uses are scalar or indirect operands 1, If the uses are scalar or indirect 1x1/vx1 operands, we should treat the uses as if they are NoMask, and any non-NoMask instruction can't kill it. This applies to both GRF and ARF. 2, IF the uses are indirect vxh operands, we should handle address register separately but not the same as GRF in alignedWithChannelMask.
1 parent 603d683 commit 0f83760

File tree

3 files changed

+1
-31
lines changed

3 files changed

+1
-31
lines changed

visa/G4_IR.cpp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1790,11 +1790,6 @@ bool G4_INST::canPropagateTo(G4_INST *useInst, Gen4_Operand_Number opndNum,
17901790
G4_Operand *use = useInst->getOperand(opndNum);
17911791
G4_Type useType = use->getType();
17921792

1793-
if (use->isIndirect()) {
1794-
// don't copy propagate for address register used in indirect access
1795-
return false;
1796-
}
1797-
17981793
// If the operand to be copied is acc register, need to check if the use
17991794
// operand can use acc register
18001795
if (src->isAccReg()) {
@@ -6025,12 +6020,6 @@ bool G4_Operand::isIndirect() const {
60256020
return false;
60266021
}
60276022

6028-
bool G4_Operand::isVxHIndirect() const {
6029-
if (isSrcRegRegion())
6030-
return asSrcRegRegion()->isVxHIndirect();
6031-
return false;
6032-
}
6033-
60346023
bool G4_Operand::crossGRF(const IR_Builder &builder) {
60356024
return getRightBound() / builder.numEltPerGRF<Type_UB>() !=
60366025
getLeftBound() / builder.numEltPerGRF<Type_UB>();

visa/G4_Operand.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,6 @@ class G4_Operand {
227227
G4_VarBase *getBase() { return base; }
228228
void setBase(G4_VarBase *b) { base = b; }
229229
bool isIndirect() const;
230-
bool isVxHIndirect() const;
231230

232231
const G4_Declare *getBaseRegVarRootDeclare() const;
233232
G4_Declare *getBaseRegVarRootDeclare();
@@ -599,10 +598,6 @@ class G4_SrcRegRegion final : public G4_Operand {
599598

600599
bool isIndirect() const { return acc != Direct; }
601600

602-
bool isVxHIndirect() const {
603-
return isIndirect() && getRegion()->isRegionWH() && getRegion()->width == 1;
604-
}
605-
606601
unsigned computeRightBound(uint8_t exec_size) override;
607602
G4_CmpRelation compareOperand(G4_Operand *opnd,
608603
const IR_Builder &builder) override;

visa/LocalDataflow.cpp

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -261,14 +261,7 @@ bool LiveNode::addDefinition(G4_INST *DefInst, Gen4_Operand_Number DefOpNum,
261261

262262
bool LiveNode::dependsOnChannelMask(bool IsInSimdFlow, G4_INST *Inst,
263263
Gen4_Operand_Number OpNum) {
264-
// Treat scalar and indirect 1x1/Vx1 uses as noMask. Any non-noMask
265-
// inst can't kill it.
266-
auto opnd = Inst->getOperand(OpNum);
267-
bool isScalarSrc = opnd->isScalarSrc();
268-
bool isIndirect1x1Vx1 = opnd->isIndirect() && !opnd->isVxHIndirect();
269-
270-
if (!IsInSimdFlow || Inst->isWriteEnableInst() || isScalarSrc ||
271-
isIndirect1x1Vx1)
264+
if (!IsInSimdFlow || Inst->isWriteEnableInst())
272265
return false;
273266

274267
// Otherwise.
@@ -311,13 +304,6 @@ bool LiveNode::alignedWithChannelMask(G4_INST *DefInst,
311304
return DefOffset == UseOffset;
312305
}
313306

314-
// UseOpnd is indirect VxH
315-
if (UseOpnd->isVxHIndirect()) {
316-
int DefOffset = int(DefLB - DefMaskOffset * TypeSize(ADDR_REG_TYPE));
317-
int UseOffset = int(UseLB - UseMaskOffset * TypeSize(ADDR_REG_TYPE));
318-
return DefOffset == UseOffset;
319-
}
320-
321307
// Do not analyze instructions that may exceed two GRF boundary
322308
if (DefInst->mayExceedTwoGRF() || UseInst->mayExceedTwoGRF())
323309
return true;

0 commit comments

Comments
 (0)