Skip to content

Commit deed56b

Browse files
priyankarpsys_zuul
authored and
sys_zuul
committed
[Autobackout][FuncReg]Revert of change: eb5648e
Avoid splitting in case of uniform destination Change-Id: I25daf539c1f0ee92da5a1ff89d1284cc082799e6
1 parent 91585d7 commit deed56b

File tree

2 files changed

+15
-21
lines changed

2 files changed

+15
-21
lines changed

IGC/Compiler/CISACodeGen/CISABuilder.cpp

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -622,8 +622,8 @@ namespace IGC
622622

623623
unsigned numParts = 0;
624624
if (NeedSplitting(dst, m_encoderState.m_dstOperand, numParts) ||
625-
NeedSplitting(src0, m_encoderState.m_srcOperand[0], numParts, true, dst) ||
626-
NeedSplitting(src1, m_encoderState.m_srcOperand[1], numParts, true, dst)) {
625+
NeedSplitting(src0, m_encoderState.m_srcOperand[0], numParts, true) ||
626+
NeedSplitting(src1, m_encoderState.m_srcOperand[1], numParts, true)) {
627627

628628
VISA_EMask_Ctrl execMask = GetAluEMask(dst);
629629
VISA_Exec_Size fromExecSize = GetAluExecSize(dst);
@@ -1050,8 +1050,8 @@ namespace IGC
10501050

10511051
unsigned numParts = 0;
10521052
if (NeedSplitting(dst, m_encoderState.m_dstOperand, numParts) ||
1053-
NeedSplitting(src0, m_encoderState.m_srcOperand[0], numParts, true, dst) ||
1054-
NeedSplitting(src1, m_encoderState.m_srcOperand[1], numParts, true, dst)) {
1053+
NeedSplitting(src0, m_encoderState.m_srcOperand[0], numParts, true) ||
1054+
NeedSplitting(src1, m_encoderState.m_srcOperand[1], numParts, true)) {
10551055

10561056
VISA_EMask_Ctrl execMask = GetAluEMask(dst);
10571057
VISA_Exec_Size fromExecSize = GetAluExecSize(dst);
@@ -1097,7 +1097,7 @@ namespace IGC
10971097
// numParts - return the total parts to be split, e.g. if the region spans 4
10981098
// GRFs, it needs splitting into 2 parts at least.
10991099
bool CEncoder::NeedSplitting(CVariable* var, const SModifier& mod,
1100-
unsigned& numParts, bool isSource, CVariable* dstVar) const
1100+
unsigned& numParts, bool isSource) const
11011101
{
11021102
// If nothing is specified, don't split.
11031103
if (!var)
@@ -1139,11 +1139,6 @@ namespace IGC
11391139
return false;
11401140
}
11411141

1142-
// Avoid splitting if destination is uniform and is not an indirect address
1143-
if (dstVar && !GetAluExecSize(dstVar)) {
1144-
return false;
1145-
}
1146-
11471142
// We assume there is no 2 GRF crossing when element size is smaller than
11481143
// 4 bytes (or 32 bits), e.g. 16-bit WORD.
11491144
if (elemSize < 4)
@@ -1571,9 +1566,8 @@ namespace IGC
15711566
}
15721567
}
15731568
unsigned numParts = 0;
1574-
1575-
if ((NeedSplitting(dst, m_encoderState.m_dstOperand, numParts)) ||
1576-
NeedSplitting(src, m_encoderState.m_srcOperand[0], numParts, true, dst)) {
1569+
if (NeedSplitting(dst, m_encoderState.m_dstOperand, numParts) ||
1570+
NeedSplitting(src, m_encoderState.m_srcOperand[0], numParts, true)) {
15771571

15781572
VISA_EMask_Ctrl execMask = GetAluEMask(dst);
15791573
VISA_Exec_Size fromExecSize = GetAluExecSize(dst);
@@ -1762,10 +1756,10 @@ namespace IGC
17621756
{
17631757
unsigned numParts = 0;
17641758
if (NeedSplitting(dst, m_encoderState.m_dstOperand, numParts) ||
1765-
NeedSplitting(src0, m_encoderState.m_srcOperand[0], numParts, true, dst) ||
1766-
NeedSplitting(src1, m_encoderState.m_srcOperand[1], numParts, true, dst) ||
1767-
NeedSplitting(src2, m_encoderState.m_srcOperand[2], numParts, true, dst) ||
1768-
NeedSplitting(src3, m_encoderState.m_srcOperand[3], numParts, true, dst)) {
1759+
NeedSplitting(src0, m_encoderState.m_srcOperand[0], numParts, true) ||
1760+
NeedSplitting(src1, m_encoderState.m_srcOperand[1], numParts, true) ||
1761+
NeedSplitting(src2, m_encoderState.m_srcOperand[2], numParts, true) ||
1762+
NeedSplitting(src3, m_encoderState.m_srcOperand[3], numParts, true)) {
17691763

17701764
VISA_EMask_Ctrl execMask = GetAluEMask(dst);
17711765
VISA_Exec_Size fromExecSize = GetAluExecSize(dst);
@@ -1816,9 +1810,9 @@ namespace IGC
18161810
{
18171811
unsigned numParts = 0;
18181812
if (NeedSplitting(dst, m_encoderState.m_dstOperand, numParts) ||
1819-
NeedSplitting(src0, m_encoderState.m_srcOperand[0], numParts, true, dst) ||
1820-
NeedSplitting(src1, m_encoderState.m_srcOperand[1], numParts, true, dst) ||
1821-
NeedSplitting(src2, m_encoderState.m_srcOperand[2], numParts, true, dst)) {
1813+
NeedSplitting(src0, m_encoderState.m_srcOperand[0], numParts, true) ||
1814+
NeedSplitting(src1, m_encoderState.m_srcOperand[1], numParts, true) ||
1815+
NeedSplitting(src2, m_encoderState.m_srcOperand[2], numParts, true)) {
18221816

18231817
VISA_EMask_Ctrl execMask = GetAluEMask(dst);
18241818
VISA_Exec_Size fromExecSize = GetAluExecSize(dst);

IGC/Compiler/CISACodeGen/CISABuilder.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ namespace IGC
450450

451451
// Variable splitting facilities (if crosses 2 GRF boundary).
452452
bool NeedSplitting(CVariable* var, const SModifier& mod,
453-
unsigned& numParts, bool isSource = false, CVariable* dstVar = nullptr) const;
453+
unsigned& numParts, bool isSource = false) const;
454454
SModifier SplitVariable(VISA_Exec_Size fromExecSize,
455455
VISA_Exec_Size toExecSize,
456456
unsigned thePart,

0 commit comments

Comments
 (0)