Skip to content

Commit 98feff6

Browse files
sys-igcigcbot
authored andcommitted
[Autobackout][FunctionalRegression]Revert of change: 025e40e: IGC_StackOverflowDetection documentation
Add StackOverflowDetection.md documentation.
1 parent 973b783 commit 98feff6

File tree

3 files changed

+4
-89
lines changed

3 files changed

+4
-89
lines changed

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

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,9 @@ void PrivateMemoryResolution::expandPrivateMemoryForVla(uint32_t &maxPrivateMem)
193193
"You can change this size by setting environmental variable IGC_ForcePerThreadPrivateMemorySize to a value in "
194194
"range [1024:20480]. "
195195
"Greater values can affect performance, and lower ones may lead to incorrect results of your program.\n"
196-
"To make sure your program runs correctly you can use IGC_StackOverflowDetection feature. See documentation:\n"
197-
"https://github.com/intel/intel-graphics-compiler/tree/master/documentation/igc/StackOverflowDetection/StackOverflowDetection.md";
196+
"To make sure your program runs correctly you can set environmental variable IGC_StackOverflowDetection=1. "
197+
"This flag will print \"Stack overflow detected!\" if insufficient memory value has led to stack overflow. "
198+
"It should be used for debugging only as it affects performance.";
198199

199200
getAnalysis<CodeGenContextWrapper>().getCodeGenContext()->EmitWarning(fullWarningMessage.c_str());
200201
}
@@ -368,17 +369,6 @@ bool PrivateMemoryResolution::runOnModule(llvm::Module &M) {
368369
if (FG->hasStackCall()) {
369370
// Analyze call depth for stack memory required
370371
maxPrivateMem = AnalyzeCGPrivateMemUsage(pKernel);
371-
std::string maxPrivateMemValue = std::to_string(maxPrivateMem);
372-
std::string fullWarningMessage =
373-
"Stack call has been detected, the private memory size is set to " + maxPrivateMemValue +
374-
"B. "
375-
"You can change this size by setting environmental variable IGC_ForcePerThreadPrivateMemorySize to a value in "
376-
"range [1024:20480]. "
377-
"Greater values can affect performance, and lower ones may lead to incorrect results of your program.\n"
378-
"To make sure your program runs correctly you can use StackOverflowDetection feature. See documentation:\n"
379-
"https://github.com/intel/intel-graphics-compiler/tree/master/documentation/igc/StackOverflowDetection/StackOverflowDetection.md";
380-
381-
getAnalysis<CodeGenContextWrapper>().getCodeGenContext()->EmitWarning(fullWarningMessage.c_str());
382372
}
383373
if (((FG->hasIndirectCall() && FG->hasPartialCallGraph()) || FG->hasRecursion()) &&
384374
Ctx.type != ShaderType::RAYTRACING_SHADER) {

IGC/common/igc_flags.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -900,7 +900,7 @@ DECLARE_IGC_REGKEY(bool, UseVMaskPredicate, false, "Use VMask as predicate for s
900900
DECLARE_IGC_REGKEY(bool, UseVMaskPredicateForLoads, true, "Use VMask as predicate for subspan usage (loads only)", true)
901901
DECLARE_IGC_REGKEY(bool, UseVMaskPredicateForIndirectMove, true,
902902
"Use VMask as predicate for subspan usage (indirect mov only)", true)
903-
DECLARE_IGC_REGKEY(bool, StackOverflowDetection, false, "Inserts checks for stack overflow when stack calls or VLAs are used. See documentation: documentation/igc/StackOverflowDetection/StackOverflowDetection.md",
903+
DECLARE_IGC_REGKEY(bool, StackOverflowDetection, false, "Inserts checks for stack overflow when stack calls are used.",
904904
true)
905905
DECLARE_IGC_REGKEY(bool, BufferBoundsChecking, false, "Setting this to 1 (true) enables buffer bounds checking", true)
906906
DECLARE_IGC_REGKEY(DWORD, MinimumValidAddress, 0,

documentation/igc/StackOverflowDetection/StackOverflowDetection.md

Lines changed: 0 additions & 75 deletions
This file was deleted.

0 commit comments

Comments
 (0)