Skip to content

Commit 1afbede

Browse files
PawelJurekpszymich
authored andcommitted
[StackOverflowDetectionRemove ForceAddingStackcallKernelPrerequisites flag depenency from StackOverflowDetection
The ForceAddingStackcallKernelPrerequisites flag is not needed after recent changes, as the overflow checking calls will be placed only when needed. (cherry picked from commit 867ae9a)
1 parent 958414d commit 1afbede

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

IGC/Compiler/Optimizer/OpenCLPasses/PrivateMemory/PrivateMemoryUsageAnalysis.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,9 @@ bool PrivateMemoryUsageAnalysis::runOnModule(Module& M)
6767
// If there are stack called functions in the module, add PRIVATE_BASE to all kernels to be safe.
6868
// PRIVATE_BASE is needed for kernel to get the stack base offset.
6969
// Callee does not require this arg, since all stack access will be done using the stack-pointer
70-
if (hasStackCall || pCtx->m_enableFunctionPointer || IGC_IS_FLAG_ENABLED(ForceAddingStackcallKernelPrerequisites))
70+
if (hasStackCall || pCtx->m_enableFunctionPointer ||
71+
IGC_IS_FLAG_ENABLED(ForceAddingStackcallKernelPrerequisites) ||
72+
IGC_IS_FLAG_ENABLED(StackOverflowDetection))
7173
{
7274
for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I)
7375
{

IGC/common/igc_regkeys.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -846,8 +846,6 @@ static void setImpliedIGCKeys()
846846
IGC_SET_IMPLIED_REGKEY(ForceOCLSIMDWidth, 16, EnableOCLSIMD16, true);
847847
IGC_SET_IMPLIED_REGKEY(ForceOCLSIMDWidth, 8, EnableOCLSIMD32, false);
848848
IGC_SET_IMPLIED_REGKEY(ForceOCLSIMDWidth, 8, EnableOCLSIMD16, false);
849-
850-
IGC_SET_IMPLIED_REGKEY(StackOverflowDetection, 1, ForceAddingStackcallKernelPrerequisites, true);
851849
}
852850

853851
void setImpliedRegkey(SRegKeyVariableMetaData& name,

0 commit comments

Comments
 (0)