[all-commits] [llvm/llvm-project] 090c10: Don't inline dynamic allocas that simplify to huge...
AE via All-commits
all-commits at lists.llvm.org
Wed Jun 24 17:39:29 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 090c108d04e2c557047f1d798dd56afcabe99373
https://github.com/llvm/llvm-project/commit/090c108d04e2c557047f1d798dd56afcabe99373
Author: Amara Emerson <aemerson at apple.com>
Date: 2020-06-24 (Wed, 24 Jun 2020)
Changed paths:
M llvm/include/llvm/Analysis/InlineCost.h
M llvm/lib/Analysis/InlineCost.cpp
A llvm/test/Transforms/Inline/dynamic-alloca-simplified-large.ll
Log Message:
-----------
Don't inline dynamic allocas that simplify to huge static allocas.
Some sequences of optimizations can generate call sites which may never be
executed during runtime, and through constant propagation result in dynamic
allocas being converted to static allocas with very large allocation amounts.
The inliner tries to move these to the caller's entry block, resulting in the
stack limits being reached/bypassed. Avoid inlining functions if this would
result.
The threshold of 64k currently doesn't get triggered on the test suite with an
-Os LTO build on arm64, care should be taken in changing this in future to avoid
needlessly pessimising inlining behaviour.
Differential Revision: https://reviews.llvm.org/D81765
More information about the All-commits
mailing list