5 Commits

Author SHA1 Message Date
Sven van Haastregt
2f119133ba
Add missing newlines at EOF; NFC (#176192) 2026-01-16 10:41:39 +01:00
David Spickett
f7fdc8d0cf [llvm][Support] Disable runOnNewStack test when threading is disabled
On our buildbot https://lab.llvm.org/buildbot/#/builders/122/builds/1478,
one of the new tests added by https://github.com/llvm/llvm-project/pull/136046
failed.

This is because on non-Apple Silicon platforms, the implementation
is to start a new thread, but when threading is disabled this is the
same as calling a function normally.
2025-05-02 09:52:47 +00:00
Michael Spencer
07deaf8464
Reland: [llvm][clang] Allocate a new stack instead of spawning a new thread to get more stack space (#136046)
Reland https://github.com/llvm/llvm-project/pull/133173

Clang spawns a new thread to avoid running out of stack space. This can
make debugging and performance analysis more difficult as how the
threads are connected is difficult to recover.

This patch introduces `runOnNewStack` and applies it in Clang. On
platforms that have good support for it this allocates a new stack and
moves to it using assembly. Doing split stacks like this actually runs
on most platforms, but many debuggers and unwinders reject the large or
backwards stack offsets that occur. Apple platforms and tools are known
to support this, so this only enables it there for now.
2025-04-30 19:14:15 -07:00
Daniel Thornburgh
2d98bdc12c
Revert "[llvm][clang] Allocate a new stack instead of spawning a new … (#135865)
…thread to get more stack space (#133173)"

This change breaks the Clang build on Mac AArch64.

This reverts commit d0c973a7a0149db3b71767d4c5a20a31e6a8ed5b. This
reverts commit 429a84f8a4bf559f43f50072747ef49d3e3b2cf1. This reverts
commit 4f64c80d5a23c244f942193e58ecac666c173308.
2025-04-15 14:46:55 -07:00
Michael Spencer
d0c973a7a0
[llvm][clang] Allocate a new stack instead of spawning a new thread to get more stack space (#133173)
Clang spawns a new thread to avoid running out of stack space. This can
make debugging and performance analysis more difficult as how the
threads are connected is difficult to recover.

This patch introduces `runOnNewStack` and applies it in Clang. On
platforms that have good support for it this allocates a new stack and
moves to it using assembly. Doing split stacks like this actually runs
on most platforms, but many debuggers and unwinders reject the large or
backwards stack offsets that occur. Apple platforms and tools are known
to support this, so this only enables it there for now.
2025-04-15 11:19:07 -07:00