[PATCH] D81765: Don't hoist very large static allocas to the entry block during inlining
Pierre Habouzit via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 12 15:58:58 PDT 2020
MadCoder added inline comments.
================
Comment at: llvm/include/llvm/Analysis/InlineCost.h:54
+/// size is above this amount in bytes.
+const unsigned MaxStaticAllocaSizeToMove = 65536;
} // namespace InlineConstants
----------------
jfb wrote:
> @MadCoder does this size limit make sense to you, or would you recommend something smaller?
64k is wayyyy too large.
a kernel stack is 16k.
and we've seen that cause explosions in ioctl() kind of syscalls that have a large switch going in their various implementations where one of the functions has a large stack buffer and is a leaf and another path has no stack allocations but will go in a deep stack.
the threshold for the kernel is likely something like 1 or 2k
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81765/new/
https://reviews.llvm.org/D81765
More information about the llvm-commits
mailing list