@@ -9836,7 +9836,7 @@ void EmitPass::emitStackAlloca(GenIntrinsicInst* GII)
9836
9836
{
9837
9837
// Static private mem access is done through the FP
9838
9838
CVariable* pFP = m_currShader->GetFP();
9839
- if ( IGC_IS_FLAG_ENABLED(EnableWriteOldFPToStack) && (m_FGA && !m_FGA->isLeafFunc(GII->getParent()->getParent())) )
9839
+ if IGC_IS_FLAG_ENABLED(EnableWriteOldFPToStack)
9840
9840
{
9841
9841
// If we have written the previous FP to the current frame's start, the start of
9842
9842
// private memory will be offset by 16 bytes
@@ -10045,7 +10045,7 @@ void EmitPass::InitializeKernelStack(Function* pKernel)
10045
10045
emitAddPointer(pSP, pStackBufferBase, pThreadOffset);
10046
10046
10047
10047
// Push a new stack frame
10048
- emitPushFrameToStack(totalAllocaSize, pKernel );
10048
+ emitPushFrameToStack(totalAllocaSize);
10049
10049
10050
10050
// Set the total alloca size for the entry function
10051
10051
m_encoder->SetFunctionAllocaStackSize(pKernel, totalAllocaSize);
@@ -10457,7 +10457,7 @@ void EmitPass::emitStackFuncEntry(Function* F)
10457
10457
m_currShader->SaveStackState();
10458
10458
10459
10459
// Push a new stack frame
10460
- emitPushFrameToStack(totalAllocaSize, F );
10460
+ emitPushFrameToStack(totalAllocaSize);
10461
10461
10462
10462
// Set the per-function private mem size
10463
10463
m_encoder->SetFunctionAllocaStackSize(F, totalAllocaSize);
@@ -16358,19 +16358,16 @@ void EmitPass::emitGenISACopy(GenIntrinsicInst* GenCopyInst)
16358
16358
// Update FP to the current SP
16359
16359
// Increment SP by pushSize
16360
16360
// Store value of previous frame's FP to the address of updated FP (for stack-walk)
16361
- void EmitPass::emitPushFrameToStack(unsigned& pushSize, Function* F )
16361
+ void EmitPass::emitPushFrameToStack(unsigned& pushSize)
16362
16362
{
16363
16363
CVariable* pFP = m_currShader->GetFP();
16364
16364
CVariable* pSP = m_currShader->GetSP();
16365
16365
16366
- // Enable write OldFP to the SP of the new frame, only do it for non-leaf functions
16367
- bool WriteOldFPToStack = IGC_IS_FLAG_ENABLED(EnableWriteOldFPToStack) && (m_FGA && !m_FGA->isLeafFunc(F));
16368
-
16369
16366
// Set FP = SP
16370
16367
m_encoder->Copy(pFP, pSP);
16371
16368
m_encoder->Push();
16372
16369
16373
- if (WriteOldFPToStack )
16370
+ if IGC_IS_FLAG_ENABLED(EnableWriteOldFPToStack )
16374
16371
{
16375
16372
// Allocate 1 extra oword to store previous frame's FP
16376
16373
pushSize += SIZE_OWORD;
@@ -16379,7 +16376,7 @@ void EmitPass::emitPushFrameToStack(unsigned& pushSize, Function* F)
16379
16376
// Update SP by pushSize
16380
16377
emitAddPointer(pSP, pSP, m_currShader->ImmToVariable(pushSize, ISA_TYPE_UD));
16381
16378
16382
- if (WriteOldFPToStack )
16379
+ if IGC_IS_FLAG_ENABLED(EnableWriteOldFPToStack )
16383
16380
{
16384
16381
// Store old FP value to current FP
16385
16382
CVariable* pOldFP = m_currShader->GetPrevFP();
0 commit comments