Skip to content

Commit 1d55314

Browse files
sys-igcigcbot
authored andcommitted
Changes in code.
1 parent b1012f7 commit 1d55314

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

IGC/Compiler/CISACodeGen/EmitVISAPass.cpp

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9836,7 +9836,7 @@ void EmitPass::emitStackAlloca(GenIntrinsicInst* GII)
98369836
{
98379837
// Static private mem access is done through the FP
98389838
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)
98409840
{
98419841
// If we have written the previous FP to the current frame's start, the start of
98429842
// private memory will be offset by 16 bytes
@@ -10045,7 +10045,7 @@ void EmitPass::InitializeKernelStack(Function* pKernel)
1004510045
emitAddPointer(pSP, pStackBufferBase, pThreadOffset);
1004610046

1004710047
// Push a new stack frame
10048-
emitPushFrameToStack(totalAllocaSize, pKernel);
10048+
emitPushFrameToStack(totalAllocaSize);
1004910049

1005010050
// Set the total alloca size for the entry function
1005110051
m_encoder->SetFunctionAllocaStackSize(pKernel, totalAllocaSize);
@@ -10457,7 +10457,7 @@ void EmitPass::emitStackFuncEntry(Function* F)
1045710457
m_currShader->SaveStackState();
1045810458

1045910459
// Push a new stack frame
10460-
emitPushFrameToStack(totalAllocaSize, F);
10460+
emitPushFrameToStack(totalAllocaSize);
1046110461

1046210462
// Set the per-function private mem size
1046310463
m_encoder->SetFunctionAllocaStackSize(F, totalAllocaSize);
@@ -16358,19 +16358,16 @@ void EmitPass::emitGenISACopy(GenIntrinsicInst* GenCopyInst)
1635816358
// Update FP to the current SP
1635916359
// Increment SP by pushSize
1636016360
// 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)
1636216362
{
1636316363
CVariable* pFP = m_currShader->GetFP();
1636416364
CVariable* pSP = m_currShader->GetSP();
1636516365

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-
1636916366
// Set FP = SP
1637016367
m_encoder->Copy(pFP, pSP);
1637116368
m_encoder->Push();
1637216369

16373-
if (WriteOldFPToStack)
16370+
if IGC_IS_FLAG_ENABLED(EnableWriteOldFPToStack)
1637416371
{
1637516372
// Allocate 1 extra oword to store previous frame's FP
1637616373
pushSize += SIZE_OWORD;
@@ -16379,7 +16376,7 @@ void EmitPass::emitPushFrameToStack(unsigned& pushSize, Function* F)
1637916376
// Update SP by pushSize
1638016377
emitAddPointer(pSP, pSP, m_currShader->ImmToVariable(pushSize, ISA_TYPE_UD));
1638116378

16382-
if (WriteOldFPToStack)
16379+
if IGC_IS_FLAG_ENABLED(EnableWriteOldFPToStack)
1638316380
{
1638416381
// Store old FP value to current FP
1638516382
CVariable* pOldFP = m_currShader->GetPrevFP();

IGC/Compiler/CISACodeGen/EmitVISAPass.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ class EmitPass : public llvm::FunctionPass
423423
uint32_t DstSubRegOffset = 0, uint32_t SrcSubRegOffset = 0);
424424
void emitCopyAll(CVariable* Dst, CVariable* Src, llvm::Type* Ty);
425425

426-
void emitPushFrameToStack(unsigned& pushSize, llvm::Function* F);
426+
void emitPushFrameToStack(unsigned& pushSize);
427427
void emitAddPointer(CVariable* Dst, CVariable* Src, CVariable* offset);
428428
// emitAddPair - emulate 64bit addtition by 32-bit operations.
429429
// Dst and Src0 must be a 64-bit type variable.

0 commit comments

Comments
 (0)