mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-25 18:46:05 +00:00

Add the clang option -finline-max-stacksize=<N> to suppress inlining of functions whose stack size exceeds the given value. Reviewed By: aeubanks Differential Revision: https://reviews.llvm.org/D131986
9 lines
358 B
C
9 lines
358 B
C
// RUN: %clang_cc1 -O2 -emit-llvm %s -o - | FileCheck %s --check-prefixes NOOPT
|
|
// RUN: %clang_cc1 -O2 -finline-max-stacksize=64 -emit-llvm %s -o - | FileCheck %s --check-prefix OPT
|
|
|
|
void foo() {}
|
|
|
|
// NOOPT-NOT: inline-max-stacksize
|
|
// OPT: define {{.*}}@foo{{.*}}#[[ATTR:[0-9]+]]
|
|
// OPT: attributes #[[ATTR]] = {{.*}}"inline-max-stacksize"="64"
|