Skip to content

Commit 04b2cda

Browse files
weiyu-chensys_zuul
authored andcommitted
Refactor spill generator to reduce the number of explicit send message descriptor construction.
Change-Id: I6e49a5c337ecadc8713567a7a8ea2642d9d18c05
1 parent 3605a56 commit 04b2cda

File tree

3 files changed

+111
-465
lines changed

3 files changed

+111
-465
lines changed

visa/Gen4_IR.cpp

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3669,6 +3669,14 @@ void G4_INST::emit_inst(std::ostream& output, bool symbol_dst, bool *symbol_srcs
36693669
if (isIntrinsic())
36703670
{
36713671
output << "." << asIntrinsicInst()->getName();
3672+
if (isSpillIntrinsic())
3673+
{
3674+
output << "." << asSpillIntrinsic()->getNumRows();
3675+
}
3676+
else if (isFillIntrinsic())
3677+
{
3678+
output << "." << asFillIntrinsic()->getNumRows();
3679+
}
36723680
}
36733681

36743682
if (mod)
@@ -3685,7 +3693,12 @@ void G4_INST::emit_inst(std::ostream& output, bool symbol_dst, bool *symbol_srcs
36853693
{// no need to emit size for nop, wait
36863694
output << '(' << static_cast<int>(execSize) << ") ";
36873695
}
3688-
if (dst)
3696+
3697+
if (isSpillIntrinsic())
3698+
{
3699+
output << "Scratch[" << asSpillIntrinsic()->getOffset() << "] ";
3700+
}
3701+
else if (dst)
36893702
{
36903703
dst->emit(output, symbol_dst); // emit symbolic/physical register depends on the flag
36913704
output << ' ';
@@ -3707,6 +3720,10 @@ void G4_INST::emit_inst(std::ostream& output, bool symbol_dst, bool *symbol_srcs
37073720
output << ' ';
37083721
}
37093722
}
3723+
if (isFillIntrinsic())
3724+
{
3725+
output << "Scratch[" << asFillIntrinsic()->getOffset() << "] ";
3726+
}
37103727

37113728
if( isMath() && asMathInst()->getMathCtrl() != MATH_RESERVED )
37123729
{

0 commit comments

Comments
 (0)