[llvm-dev] Handling of non-fixed stack reservations

Tim Northover via llvm-dev llvm-dev at lists.llvm.org
Sat Oct 3 18:39:30 PDT 2015

On 3 October 2015 at 18:28, Martin J. O'Riordan via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> The 20-bytes is just a property of this particular code, it could be any
> value, but is there an option or interface to override somewhere in the
> target machine description that allows the target to specify a threshold for
> variable stack reservations so that values under a given threshold are put
> in the fixed stack reservation?  Or perhaps a pass that I don't yet know of
> that can observe such patterns and perform the and aggregated reservation of
> the largest amount just once before the sequence of calls, and then restore
> after they have completed?

I don't think there's any heuristic-based tuning available (most
targets just allocate enough stack for all possible calls on function
entry whenever they can, I believe). But the toggle you can play with
is the hasReservedCallFrame callback.



More information about the llvm-dev mailing list