Skip to content

Commit 867ae9a

Browse files
PawelJurekigcbot
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.
1 parent 64db140 commit 867ae9a

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
@@ -845,8 +845,6 @@ static void setImpliedIGCKeys()
845845
IGC_SET_IMPLIED_REGKEY(ForceOCLSIMDWidth, 16, EnableOCLSIMD16, true);
846846
IGC_SET_IMPLIED_REGKEY(ForceOCLSIMDWidth, 8, EnableOCLSIMD32, false);
847847
IGC_SET_IMPLIED_REGKEY(ForceOCLSIMDWidth, 8, EnableOCLSIMD16, false);
848-
849-
IGC_SET_IMPLIED_REGKEY(StackOverflowDetection, 1, ForceAddingStackcallKernelPrerequisites, true);
850848
}
851849

852850
void setImpliedRegkey(SRegKeyVariableMetaData& name,

0 commit comments

Comments
 (0)