aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorEvgenii Stepanov <eugenis@google.com>2020-10-15 16:10:42 -0700
committerEvgenii Stepanov <eugenis@google.com>2020-10-19 13:44:07 -0700
commit188a7d671019247932b7242c7794960ca1986b5a (patch)
tree1f0099f5c663067cebc32ebd15d79aaf6d6db661 /clang/lib/Frontend/CompilerInvocation.cpp
parentc76968d8b60e5ac75d3630eeff685a44d8450f74 (diff)
downloadllvm-188a7d671019247932b7242c7794960ca1986b5a.zip
llvm-188a7d671019247932b7242c7794960ca1986b5a.tar.gz
llvm-188a7d671019247932b7242c7794960ca1986b5a.tar.bz2
Add alloca size threshold for StackTagging initializer merging.
Summary: Initializer merging generates pretty inefficient code for large allocas that also happens to trigger an exponential algorithm somewhere in Machine Instruction Scheduler. See https://bugs.llvm.org/show_bug.cgi?id=47867. This change adds an upper limit for the alloca size. The default limit is selected such that worst case size of memtag-generated code is similar to non-memtag (but because of the ISA quirks, this case is realized at the different value of alloca size, ex. memset inlining triggers at sizes below 512, but stack tagging instructions are 2x shorter, so limit is approx. 256). We could try harder to emit more compact code with initializer merging, but that would only affect large, sparsely initialized allocas, and those are doing fine already. Reviewers: vitalybuka, pcc Subscribers: llvm-commits
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions