@@ -10064,7 +10064,7 @@ void EmitPass::InitializeKernelStack(Function* pKernel)
1006410064 emitAddPointer(pSP, pStackBufferBase, pThreadOffset);
1006510065
1006610066 // Push a new stack frame
10067- emitPushFrameToStack(totalAllocaSize, pKernel );
10067+ emitPushFrameToStack(totalAllocaSize);
1006810068
1006910069 // Set the total alloca size for the entry function
1007010070 m_encoder->SetFunctionAllocaStackSize(pKernel, totalAllocaSize);
@@ -10476,7 +10476,7 @@ void EmitPass::emitStackFuncEntry(Function* F)
1047610476 m_currShader->SaveStackState();
1047710477
1047810478 // Push a new stack frame
10479- emitPushFrameToStack(totalAllocaSize, F );
10479+ emitPushFrameToStack(totalAllocaSize);
1048010480
1048110481 // Set the per-function private mem size
1048210482 m_encoder->SetFunctionAllocaStackSize(F, totalAllocaSize);
@@ -16362,22 +16362,16 @@ void EmitPass::emitGenISACopy(GenIntrinsicInst* GenCopyInst)
1636216362// Update FP to the current SP
1636316363// Increment SP by pushSize
1636416364// Store value of previous frame's FP to the address of updated FP (for stack-walk)
16365- void EmitPass::emitPushFrameToStack(unsigned& pushSize, Function* F )
16365+ void EmitPass::emitPushFrameToStack(unsigned& pushSize)
1636616366{
1636716367 CVariable* pFP = m_currShader->GetFP();
1636816368 CVariable* pSP = m_currShader->GetSP();
16369- bool WriteOldFPToStack = IGC_IS_FLAG_ENABLED(EnableWriteOldFPToStack);
16370- if (m_FGA && m_FGA->isLeafFunc(F))
16371- {
16372- // We don't need to do this if the function is already a leaf
16373- WriteOldFPToStack = false;
16374- }
1637516369
1637616370 // Set FP = SP
1637716371 m_encoder->Copy(pFP, pSP);
1637816372 m_encoder->Push();
1637916373
16380- if (WriteOldFPToStack )
16374+ if IGC_IS_FLAG_ENABLED(EnableWriteOldFPToStack )
1638116375 {
1638216376 // Allocate 1 extra oword to store previous frame's FP
1638316377 pushSize += SIZE_OWORD;
@@ -16386,7 +16380,7 @@ void EmitPass::emitPushFrameToStack(unsigned& pushSize, Function* F)
1638616380 // Update SP by pushSize
1638716381 emitAddPointer(pSP, pSP, m_currShader->ImmToVariable(pushSize, ISA_TYPE_UD));
1638816382
16389- if (WriteOldFPToStack )
16383+ if IGC_IS_FLAG_ENABLED(EnableWriteOldFPToStack )
1639016384 {
1639116385 // Store old FP value to current FP
1639216386 CVariable* pOldFP = m_currShader->GetPrevFP();
0 commit comments