9#ifndef LLVM_SUPPORT_PROGRAMSTACK_H
10#define LLVM_SUPPORT_PROGRAMSTACK_H
20#if defined(__APPLE__) && defined(__MACH__) && defined(__aarch64__) && \
21 __has_extension(gnu_asm)
22# define LLVM_HAS_SPLIT_STACKS
23# define LLVM_HAS_SPLIT_STACKS_AARCH64
48template <
typename R,
typename... Ts>
49std::enable_if_t<!std::is_same_v<R, void>,
R>
52 runOnNewStack(StackSize, [&]() { Ret = Fn(std::forward<Ts>(Args)...); });
53 return std::move(*Ret);
56template <
typename... Ts>
59 runOnNewStack(StackSize, [&]() { Fn(std::forward<Ts>(Args)...); });
An efficient, type-erasing, non-owning reference to a callable.
This is an optimization pass for GlobalISel generic memory operations.
LLVM_ABI void runOnNewStack(unsigned StackSize, function_ref< void()> Fn)
Runs Fn on a new stack of at least the given size.
LLVM_ABI unsigned getDefaultStackSize()
LLVM_ABI uintptr_t getStackPointer()