@@ -2586,10 +2586,8 @@ SpillManagerGRF::createSpillSendInstr (
2586
2586
messageDescImm =
2587
2587
createSpillSendMsgDesc (spillOff, height, execSize, rvar->getBaseRegVar ());
2588
2588
#ifdef _DEBUG
2589
- {
2590
- int offset = (messageDescImm->getInt () & 0xFFF ) * numEltPerGRF (Type_UB);
2591
- MUST_BE_TRUE (offset >= globalScratchOffset, " incorrect offset" );
2592
- }
2589
+ int offset = (messageDescImm->getInt () & 0xFFF ) * numEltPerGRF (Type_UB);
2590
+ MUST_BE_TRUE (offset >= globalScratchOffset, " incorrect offset" );
2593
2591
#endif
2594
2592
}
2595
2593
else
@@ -2608,8 +2606,7 @@ SpillManagerGRF::createSpillSendInstr (
2608
2606
2609
2607
auto off = G4_SpillIntrinsic::InvalidOffset;
2610
2608
G4_Declare* fp = nullptr ;
2611
- if (useScratchMsg_
2612
- )
2609
+ if (useScratchMsg_)
2613
2610
off = (messageDescImm->getInt () & 0xfff );
2614
2611
else
2615
2612
{
@@ -2624,9 +2621,6 @@ SpillManagerGRF::createSpillSendInstr (
2624
2621
off = (offset + spillOff * getGRFSize ()) >> SCRATCH_SPACE_ADDRESS_UNIT;
2625
2622
if (builder_->kernel .fg .getIsStackCallFunc () || builder_->kernel .fg .getHasStackCalls ())
2626
2623
fp = builder_->kernel .fg .getFramePtrDcl ();
2627
-
2628
- if (!fp && offset < SCRATCH_MSG_LIMIT)
2629
- headerOpnd = builder_->Create_Src_Opnd_From_Dcl (builder_->getBuiltinR0 (), builder_->getRegionStride1 ());
2630
2624
}
2631
2625
}
2632
2626
sendInst = builder_->createSpill (postDst, headerOpnd, srcOpnd, execSize, height, off, fp, InstOpt_WriteEnable);
@@ -2656,8 +2650,7 @@ SpillManagerGRF::createSpillSendInstr (
2656
2650
)
2657
2651
{
2658
2652
#ifdef _DEBUG
2659
- if (useScratchMsg_
2660
- )
2653
+ if (useScratchMsg_)
2661
2654
{
2662
2655
G4_Imm* messageDescImm =
2663
2656
createSpillSendMsgDesc (spilledRangeRegion, execSize);
@@ -2678,8 +2671,7 @@ SpillManagerGRF::createSpillSendInstr (
2678
2671
2679
2672
auto off = G4_SpillIntrinsic::InvalidOffset;
2680
2673
G4_Declare* fp = nullptr ;
2681
- if (useScratchMsg_
2682
- )
2674
+ if (useScratchMsg_)
2683
2675
{
2684
2676
G4_Imm* messageDescImm =
2685
2677
createSpillSendMsgDesc (spilledRangeRegion, execSize);
@@ -2699,9 +2691,6 @@ SpillManagerGRF::createSpillSendInstr (
2699
2691
off = (offset + regOff * getGRFSize ()) >> SCRATCH_SPACE_ADDRESS_UNIT;
2700
2692
if (builder_->kernel .fg .getIsStackCallFunc () || builder_->kernel .fg .getHasStackCalls ())
2701
2693
fp = builder_->kernel .fg .getFramePtrDcl ();
2702
-
2703
- if (!fp && offset < SCRATCH_MSG_LIMIT)
2704
- headerOpnd = builder_->Create_Src_Opnd_From_Dcl (builder_->getBuiltinR0 (), builder_->getRegionStride1 ());
2705
2694
}
2706
2695
}
2707
2696
sendInst = builder_->createSpill (postDst, headerOpnd, srcOpnd, execSize, (uint16_t )extMsgLength,
@@ -2915,10 +2904,8 @@ SpillManagerGRF::createFillSendInstr (
2915
2904
messageDescImm =
2916
2905
createFillSendMsgDesc (spillOff, height, execSize, rvar->getBaseRegVar ());
2917
2906
#ifdef _DEBUG
2918
- {
2919
- int offset = (messageDescImm->getInt () & 0xFFF ) * numEltPerGRF (Type_UB);
2920
- MUST_BE_TRUE (offset >= globalScratchOffset, " incorrect offset" );
2921
- }
2907
+ int offset = (messageDescImm->getInt () & 0xFFF ) * numEltPerGRF (Type_UB);
2908
+ MUST_BE_TRUE (offset >= globalScratchOffset, " incorrect offset" );
2922
2909
#endif
2923
2910
}
2924
2911
else
@@ -2935,8 +2922,7 @@ SpillManagerGRF::createFillSendInstr (
2935
2922
2936
2923
unsigned int off = G4_FillIntrinsic::InvalidOffset;
2937
2924
G4_Declare* fp = nullptr ;
2938
- if (useScratchMsg_
2939
- )
2925
+ if (useScratchMsg_)
2940
2926
off = (messageDescImm->getInt () & 0xfff );
2941
2927
else
2942
2928
{
@@ -2952,9 +2938,6 @@ SpillManagerGRF::createFillSendInstr (
2952
2938
off = (offset + spillOff * getGRFSize ()) >> SCRATCH_SPACE_ADDRESS_UNIT;
2953
2939
if (builder_->kernel .fg .getIsStackCallFunc () || builder_->kernel .fg .getHasStackCalls ())
2954
2940
fp = builder_->kernel .fg .getFramePtrDcl ();
2955
-
2956
- if (!fp && offset < SCRATCH_MSG_LIMIT)
2957
- payload = builder_->Create_Src_Opnd_From_Dcl (builder_->getBuiltinR0 (), builder_->getRegionStride1 ());
2958
2941
}
2959
2942
}
2960
2943
auto fillInst = builder_->createFill (payload, postDst, execSize, height, off, fp, InstOpt_WriteEnable);
@@ -2990,8 +2973,7 @@ SpillManagerGRF::createFillSendInstr(
2990
2973
unsigned int off = G4_FillIntrinsic::InvalidOffset;
2991
2974
unsigned segmentByteSize = getSegmentByteSize (filledRangeRegion, oldExecSize);
2992
2975
G4_Declare* fp = nullptr ;
2993
- if (useScratchMsg_
2994
- )
2976
+ if (useScratchMsg_)
2995
2977
{
2996
2978
G4_Imm* messageDescImm =
2997
2979
createFillSendMsgDesc (filledRangeRegion, oldExecSize);
@@ -3013,9 +2995,6 @@ SpillManagerGRF::createFillSendInstr(
3013
2995
off = offset >> SCRATCH_SPACE_ADDRESS_UNIT;
3014
2996
if (builder_->kernel .fg .getIsStackCallFunc () || builder_->kernel .fg .getHasStackCalls ())
3015
2997
fp = builder_->kernel .fg .getFramePtrDcl ();
3016
-
3017
- if (!fp && offset < SCRATCH_MSG_LIMIT)
3018
- payload = builder_->Create_Src_Opnd_From_Dcl (builder_->getBuiltinR0 (), builder_->getRegionStride1 ());
3019
2998
}
3020
2999
}
3021
3000
@@ -4255,10 +4234,6 @@ void GlobalRA::expandSpillNonStackcall(
4255
4234
G4_SrcRegRegion* headerOpnd = builder->Create_Src_Opnd_From_Dcl (builder->getBuiltinR0 (), region);
4256
4235
G4_Imm* extDesc = builder->createImm (msgDesc->getExtendedDesc (), Type_UD);
4257
4236
G4_ExecSize execSize = inst->getExecSize (); // numRows > 1 ? 16 : 8;
4258
- if (execSize < g4::SIMD8)
4259
- execSize = g4::SIMD8;
4260
- else if (execSize < g4::SIMD16 && numRows > 1 )
4261
- execSize = g4::SIMD16;
4262
4237
4263
4238
auto sendInst = builder->createInternalSplitSendInst (nullptr , G4_sends, execSize,
4264
4239
inst->getDst (), headerOpnd, payloadToUse, msgDescImm,
@@ -4586,10 +4561,8 @@ void GlobalRA::expandFillIntrinsic(G4_BB* bb)
4586
4561
}
4587
4562
4588
4563
4589
- void GlobalRA::expandSpillFillIntrinsics (unsigned int spillSizeInBytes )
4564
+ void GlobalRA::expandSpillFillIntrinsics ()
4590
4565
{
4591
- auto globalScratchOffset = kernel.getInt32KernelAttr (Attributes::ATTR_SpillMemOffset);
4592
-
4593
4566
for (auto bb : kernel.fg )
4594
4567
{
4595
4568
expandSpillIntrinsic (bb);
0 commit comments