We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c817d5d commit 9be9141Copy full SHA for 9be9141
compiler/rustc_data_structures/src/stack.rs
@@ -5,7 +5,11 @@ const RED_ZONE: usize = 100 * 1024; // 100k
5
6
// Only the first stack that is pushed, grows exponentially (2^n * STACK_PER_RECURSION) from then
7
// on. This flag has performance relevant characteristics. Don't set it too high.
8
+#[cfg(not(target_os="aix"))]
9
const STACK_PER_RECURSION: usize = 1024 * 1024; // 1MB
10
+// LLVM for AIX doesn't feature TCO, increase recursion size for workaround.
11
+#[cfg(target_os="aix")]
12
+const STACK_PER_RECURSION: usize = 16 * 1024 * 1024; // 16MB
13
14
/// Grows the stack on demand to prevent stack overflow. Call this in strategic locations
15
/// to "break up" recursive calls. E.g. almost any call to `visit_expr` or equivalent can benefit
0 commit comments