llvm-project/clang/lib/Sema
Reid Kleckner 9e9606ec18 Avoid std::map&vector in hexagon builtin code to save code size
Constructing a global std::map requires clang to generate a linear
amount of code to construct the initializer list if the elements are not
constexpr-constructible. std::vector is not constexpr-constructible, so
this code pattern was generating large amounts of code.

Also, because of PR38829, LLVM is pathologically slow on large basic
blocks, and this causes slow compilation. This works around the bug and
reduces code size.

SemaChecking.cpp -debug-info-kind=limited:
        time      objsize
before: 1m45.023s 9.8M
after:  0m25.205s 6.9M

So, a 42% obj size reduction and 3.2x speedup.

llvm-svn: 345329
2018-10-25 22:37:30 +00:00
..
AnalysisBasedWarnings.cpp llvm::sort(C.begin(), C.end(), ...) -> llvm::sort(C, ...) 2018-09-26 22:16:28 +00:00
CMakeLists.txt Fix llvm-clang-x86_64-expensive-checks-win build by setting bigobj flag. 2018-10-05 12:33:57 +00:00
CodeCompleteConsumer.cpp [clang] Introduce new completion context types 2018-10-24 15:23:49 +00:00
CoroutineStmtBuilder.h Remove \brief commands from doxygen comments. 2018-05-09 01:00:01 +00:00
DeclSpec.cpp [SEMA] split ExtWarn dupl-decl-spec's into Extension and ExtWarn 2018-10-03 23:09:29 +00:00
DelayedDiagnostic.cpp Remove trailing space 2018-07-30 19:24:48 +00:00
IdentifierResolver.cpp [AST] Various optimizations + refactoring in DeclarationName(Table) 2018-09-21 12:53:22 +00:00
JumpDiagnostics.cpp Port getLocStart -> getBeginLoc 2018-08-09 21:08:08 +00:00
MultiplexExternalSemaSource.cpp Remove trailing space 2018-07-30 19:24:48 +00:00
ParsedAttr.cpp Support accepting __gnu__ as a scoped attribute namespace that aliases to gnu. 2018-10-24 12:26:23 +00:00
Scope.cpp Revert r335019 "Update NRVO logic to support early return (Attempt 2)" 2018-06-19 05:35:30 +00:00
ScopeInfo.cpp Distinguish `__block` variables that are captured by escaping blocks 2018-10-01 21:51:28 +00:00
Sema.cpp [Fixed Point Arithmetic] Fixed Point to Boolean Cast 2018-10-23 17:55:35 +00:00
SemaAccess.cpp P0969R0: allow structured binding of accessible members, not only public members. 2018-09-25 22:12:44 +00:00
SemaAttr.cpp We have in place support for parsing #pragma FENV_ACCESS, but that 2018-08-14 17:06:56 +00:00
SemaCUDA.cpp [NFC] Rename clang::AttributeList to clang::ParsedAttr 2018-07-13 15:07:47 +00:00
SemaCXXScopeSpec.cpp Clean up and simplify RequireCompleteType. 2018-08-07 21:35:41 +00:00
SemaCast.cpp [OpenCL][NFC] Unify ZeroToOCL* cast types 2018-10-23 15:19:20 +00:00
SemaChecking.cpp Avoid std::map&vector in hexagon builtin code to save code size 2018-10-25 22:37:30 +00:00
SemaCodeComplete.cpp [clang] Introduce new completion context types 2018-10-24 15:23:49 +00:00
SemaConsumer.cpp
SemaCoroutine.cpp [coro]Pass rvalue reference for named local variable to return_value 2018-10-08 03:08:39 +00:00
SemaDecl.cpp [Sema] Do not show unused parameter warnings when body is skipped 2018-10-24 08:29:24 +00:00
SemaDeclAttr.cpp Support accepting __gnu__ as a scoped attribute namespace that aliases to gnu. 2018-10-24 12:26:23 +00:00
SemaDeclCXX.cpp [CUDA][HIP] Fix ShouldDeleteSpecialMember for inherited constructors 2018-10-09 15:53:14 +00:00
SemaDeclObjC.cpp Port getLocEnd -> getEndLoc 2018-08-09 21:09:38 +00:00
SemaExceptionSpec.cpp Remove unnecessary semicolon to silence -Wpedantic warning. NFCI. 2018-09-06 15:16:17 +00:00
SemaExpr.cpp [Sema] Fix -Wcomma for C89 2018-10-25 01:08:00 +00:00
SemaExprCXX.cpp Revert "[SemaCXX] Unconfuse Clang when std::align_val_t is unscoped in C++03" 2018-10-25 19:50:43 +00:00
SemaExprMember.cpp Remove trailing space 2018-07-30 19:24:48 +00:00
SemaExprObjC.cpp [Sema][ObjC] Infer availability of +new from availability of -init. 2018-09-10 22:20:09 +00:00
SemaFixItUtils.cpp [Sema] Revert r329346 because of memory sanitizer failures. 2018-04-05 22:15:42 +00:00
SemaInit.cpp [OpenCL][NFC] Unify ZeroToOCL* cast types 2018-10-23 15:19:20 +00:00
SemaLambda.cpp [C++17] Reject shadowing of capture by parameter in lambda 2018-10-25 20:15:03 +00:00
SemaLookup.cpp Use llvm::{all,any,none}_of instead std::{all,any,none}_of. NFC 2018-10-20 17:53:42 +00:00
SemaObjCProperty.cpp Add -Wobjc-property-assign-on-object-type. 2018-09-05 19:02:00 +00:00
SemaOpenMP.cpp [OPENMP]Fix PR39422: variables are not firstprivatized in task context. 2018-10-25 15:35:27 +00:00
SemaOverload.cpp Use llvm::{all,any,none}_of instead std::{all,any,none}_of. NFC 2018-10-20 17:53:42 +00:00
SemaPseudoObject.cpp Port getLocStart -> getBeginLoc 2018-08-09 21:08:08 +00:00
SemaStmt.cpp [Sema] Fix -Wcomma for C89 2018-10-25 01:08:00 +00:00
SemaStmtAsm.cpp [AST, analyzer] Transform rvalue cast outputs to lvalues (fheinous-gnu-extensions) 2018-10-20 22:49:23 +00:00
SemaStmtAttr.cpp Merge two attribute diagnostics into one 2018-09-17 10:39:46 +00:00
SemaTemplate.cpp [clang] Properly apply attributes on explicit instantiations of static data members 2018-10-10 15:32:29 +00:00
SemaTemplateDeduction.cpp Port getLocStart -> getBeginLoc 2018-08-09 21:08:08 +00:00
SemaTemplateInstantiate.cpp [clang] Add the exclude_from_explicit_instantiation attribute 2018-10-04 15:49:42 +00:00
SemaTemplateInstantiateDecl.cpp [OPENMP] Add support for OMP5 requires directive + unified_address clause 2018-09-26 04:28:39 +00:00
SemaTemplateVariadic.cpp Port getLocEnd -> getEndLoc 2018-08-09 21:09:38 +00:00
SemaType.cpp Support accepting __gnu__ as a scoped attribute namespace that aliases to gnu. 2018-10-24 12:26:23 +00:00
TreeTransform.h Add support for 'dynamic_allocators' clause on 'requires' directive. Differential Revision: https://reviews.llvm.org/D53079 2018-10-11 14:41:10 +00:00
TypeLocBuilder.cpp [Sema] Fix bug in TypeLocBuilder::pushImpl 2016-02-18 21:05:09 +00:00
TypeLocBuilder.h Remove trailing space 2018-07-30 19:24:48 +00:00