Skip to content

Commit ba3c0bc

Browse files
bcheng0127sys_zuul
authored and
sys_zuul
committed
new feature support
Change-Id: Icc21604470d2e58ffae64419b87d69dc7d6c7070
1 parent 4ff0a0b commit ba3c0bc

File tree

3 files changed

+32
-6
lines changed

3 files changed

+32
-6
lines changed

visa/G4Verifier.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,11 @@ void G4Verifier::verifyDstSrcOverlap(G4_INST* inst)
270270
return;
271271
}
272272

273+
if (!inst->isComprInst())
274+
{
275+
return;
276+
}
277+
273278
int dstStart = dst->getLinearizedStart() / GENX_GRF_REG_SIZ;
274279
int dstEnd = dst->getLinearizedEnd() / GENX_GRF_REG_SIZ;
275280

visa/LocalScheduler/SWSB_G4IR.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4257,12 +4257,19 @@ void G4_BB_SB::getGRFFootprintForIndirect(SBNode* node,
42574257
void G4_BB_SB::getGRFBuckets(SBNode* node,
42584258
SBFootprint* footprint,
42594259
Gen4_Operand_Number opndNum,
4260-
std::vector<SBBucketDescr>& BDvec)
4260+
std::vector<SBBucketDescr>& BDvec,
4261+
bool GRFOnly)
42614262
{
42624263
SBFootprint* curFootprint = footprint;
42634264

42644265
while (curFootprint != nullptr)
42654266
{
4267+
if (GRFOnly && (curFootprint->fType != GRF_T))
4268+
{
4269+
curFootprint = curFootprint->next;
4270+
continue;
4271+
}
4272+
42664273
int aregOffset = totalGRFNum;
42674274
int startingBucket = curFootprint->LeftB / G4_GRF_REG_NBYTES;
42684275
int endingBucket = curFootprint->RightB / G4_GRF_REG_NBYTES;
@@ -4331,7 +4338,7 @@ void G4_BB_SB::getGRFBucketsForOperands(SBNode* node,
43314338
{
43324339
continue;
43334340
}
4334-
getGRFBuckets(node, footprint, opndNum, BDvec);
4341+
getGRFBuckets(node, footprint, opndNum, BDvec, GRFOnly);
43354342
}
43364343

43374344
return;

visa/LocalScheduler/SWSB_G4IR.h

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,23 @@ namespace vISA
136136

137137
void setOffset(unsigned short o) { offset = o; }
138138

139+
bool hasOverlap(SBFootprint* liveFootprint) const
140+
{
141+
SBFootprint* curFootprint2Ptr = liveFootprint;
142+
while (curFootprint2Ptr)
143+
{
144+
// Negative of no overlap: !(LeftB > curFootprint2Ptr->RightB || RightB < curFootprint2Ptr->LeftB)
145+
if (fType == curFootprint2Ptr->fType &&
146+
LeftB <= curFootprint2Ptr->RightB && RightB >= curFootprint2Ptr->LeftB)
147+
{
148+
return true;
149+
}
150+
curFootprint2Ptr = curFootprint2Ptr->next;
151+
}
152+
153+
return false;
154+
}
155+
139156
bool hasOverlap(SBFootprint *liveFootprint, unsigned short &internalOffset) const
140157
{
141158
SBFootprint *curFootprint2Ptr = liveFootprint;
@@ -984,14 +1001,11 @@ namespace vISA
9841001
SBFootprint* getFootprintForFlag(G4_Operand* opnd,
9851002
Gen4_Operand_Number opnd_num,
9861003
G4_INST* inst);
987-
void getGRFBuckets(SBNode *node,
988-
SBFootprint* footprint,
989-
Gen4_Operand_Number opndNum,
990-
std::vector<SBBucketDescr>& BDvec);
9911004
bool getFootprintForOperand(SBNode *node,
9921005
G4_INST *inst,
9931006
G4_Operand* opnd,
9941007
Gen4_Operand_Number opnd_num);
1008+
void getGRFBuckets(SBNode* node, SBFootprint* footprint, Gen4_Operand_Number opndNum, std::vector<SBBucketDescr>& BDvec, bool GRFOnly);
9951009
bool getGRFFootPrintOperands(SBNode *node,
9961010
G4_INST *inst,
9971011
Gen4_Operand_Number first_opnd,

0 commit comments

Comments
 (0)