Skip to content

Commit f210021

Browse files
PawelJurekpszymich
authored andcommitted
StackOverflowDetection: always add private base when ForceAddingStackcallKernelPrerequisites flag is used
StackOverflowDetection mechanism needs stack call prerequisites and setting in implies ForceAddingStackcallKernelPrerequisites flag. When private base was not used by the kernel the compiler would crash when the flag was enabled, as adding private base was missing under ForceAddingStackcallKernelPrerequisites. (cherry picked from commit 7c598c8)
1 parent 3a4372b commit f210021

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ 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)
70+
if (hasStackCall || pCtx->m_enableFunctionPointer || IGC_IS_FLAG_ENABLED(ForceAddingStackcallKernelPrerequisites))
7171
{
7272
for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I)
7373
{

0 commit comments

Comments
 (0)