diff --git a/openmp/libomptarget/DeviceRTL/CMakeLists.txt b/openmp/libomptarget/DeviceRTL/CMakeLists.txt --- a/openmp/libomptarget/DeviceRTL/CMakeLists.txt +++ b/openmp/libomptarget/DeviceRTL/CMakeLists.txt @@ -122,7 +122,7 @@ ${source_directory}/Workshare.cpp ) -set(clang_opt_flags -O1 -mllvm -openmp-opt-disable -DSHARED_SCRATCHPAD_SIZE=2048) +set(clang_opt_flags -O1 -mllvm -openmp-opt-disable -DSHARED_SCRATCHPAD_SIZE=512) set(link_opt_flags -O1 -openmp-opt-disable) # Prepend -I to each list element diff --git a/openmp/libomptarget/DeviceRTL/src/State.cpp b/openmp/libomptarget/DeviceRTL/src/State.cpp --- a/openmp/libomptarget/DeviceRTL/src/State.cpp +++ b/openmp/libomptarget/DeviceRTL/src/State.cpp @@ -136,6 +136,9 @@ return Ptr; } + if (config::isDebugMode(config::DebugKind::CommonIssues)) + PRINT("Shared memory stack full, fallback to dynamic allocation of global " + "memory will negatively impact performance."); void *GlobalMemory = memory::allocGlobal( AlignedBytes, "Slow path shared memory allocation, insufficient " "shared memory stack memory!");