diff options
author | Piotr Padlewski <piotr.padlewski@gmail.com> | 2016-08-11 22:13:57 +0000 |
---|---|---|
committer | Piotr Padlewski <piotr.padlewski@gmail.com> | 2016-08-11 22:13:57 +0000 |
commit | 332b3b22109e9c0d84456888150c0a30f378f984 (patch) | |
tree | 777b39aba73791c52ead7d1c4a2e785441b0c86c /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | |
parent | 6daefcf6262299a4233231c49b9048c1062dbc90 (diff) | |
download | llvm-332b3b22109e9c0d84456888150c0a30f378f984.zip llvm-332b3b22109e9c0d84456888150c0a30f378f984.tar.gz llvm-332b3b22109e9c0d84456888150c0a30f378f984.tar.bz2 |
Don't import variadic functions
Summary:
This patch adds IsVariadicFunction bit to summary in order
to not import variadic functions. Inliner doesn't inline
variadic functions because it is hard to reason about it.
This one small fix improves Importer by about 16%
(going from 86% to 100% of imported functions that are
inlined anywhere)
on some spec benchmarks like 'int' and others.
Reviewers: eraman, mehdi_amini, tejohnson
Subscribers: mehdi_amini, llvm-commits
Differential Revision: https://reviews.llvm.org/D23339
llvm-svn: 278432
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
-rw-r--r-- | llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp index dce175b..eadef18 100644 --- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp @@ -991,7 +991,7 @@ static uint64_t getEncodedGVSummaryFlags(GlobalValueSummary::GVFlags Flags) { uint64_t RawFlags = 0; RawFlags |= Flags.HasSection; // bool - + RawFlags |= (Flags.IsNotViableToInline << 1); // Linkage don't need to be remapped at that time for the summary. Any future // change to the getEncodedLinkage() function will need to be taken into // account here as well. |