diff options
author | David Majnemer <david.majnemer@gmail.com> | 2015-11-04 03:40:30 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2015-11-04 03:40:30 +0000 |
commit | d9b1a4fb710d45b2acba65d6248d91af22788c6e (patch) | |
tree | c5343ab0425c83973e966e4fb34959b609a31263 /clang/lib/Serialization/ASTWriter.cpp | |
parent | 40d3570c4470bd7c6dde62669a7192d7ffe900b6 (diff) | |
download | bcm5719-llvm-d9b1a4fb710d45b2acba65d6248d91af22788c6e.tar.gz bcm5719-llvm-d9b1a4fb710d45b2acba65d6248d91af22788c6e.zip |
[Sema] Implement __make_integer_seq
This new builtin template allows for incredibly fast instantiations of
templates like std::integer_sequence.
Performance numbers follow:
My work station has 64 GB of ram + 20 Xeon Cores at 2.8 GHz.
__make_integer_seq<std::integer_sequence, int, 90000> takes 0.25
seconds.
std::make_integer_sequence<int, 90000> takes unbound time, it is still
running. Clang is consuming gigabytes of memory.
Differential Revision: http://reviews.llvm.org/D13786
llvm-svn: 252036
Diffstat (limited to 'clang/lib/Serialization/ASTWriter.cpp')
-rw-r--r-- | clang/lib/Serialization/ASTWriter.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Serialization/ASTWriter.cpp b/clang/lib/Serialization/ASTWriter.cpp index c5a9755fed3..8fc32eaaa93 100644 --- a/clang/lib/Serialization/ASTWriter.cpp +++ b/clang/lib/Serialization/ASTWriter.cpp @@ -4136,6 +4136,8 @@ uint64_t ASTWriter::WriteASTCore(Sema &SemaRef, StringRef isysroot, RegisterPredefDecl(Context.BuiltinMSVaListDecl, PREDEF_DECL_BUILTIN_MS_VA_LIST_ID); RegisterPredefDecl(Context.ExternCContext, PREDEF_DECL_EXTERN_C_CONTEXT_ID); + RegisterPredefDecl(Context.MakeIntegerSeqDecl, + PREDEF_DECL_MAKE_INTEGER_SEQ_ID); // Build a record containing all of the tentative definitions in this file, in // TentativeDefinitions order. Generally, this record will be empty for |