llvm-project/clang/lib/Sema
Johannes Doerfert ac991bbb44 Emit !callback metadata and introduce the callback attribute
With commit r351627, LLVM gained the ability to apply (existing) IPO
  optimizations on indirections through callbacks, or transitive calls.
  The general idea is that we use an abstraction to hide the middle man
  and represent the callback call in the context of the initial caller.
  It is described in more detail in the commit message of the LLVM patch
  r351627, the llvm::AbstractCallSite class description, and the
  language reference section on callback-metadata.

  This commit enables clang to emit !callback metadata that is
  understood by LLVM. It does so in three different cases:
    1) For known broker functions declarations that are directly
       generated, e.g., __kmpc_fork_call for the OpenMP pragma parallel.
    2) For known broker functions that are identified by their name and
       source location through the builtin detection, e.g.,
       pthread_create from the POSIX thread API.
    3) For user annotated functions that carry the "callback(callee, ...)"
       attribute. The attribute has to include the name, or index, of
       the callback callee and how the passed arguments can be
       identified (as many as the callback callee has). See the callback
       attribute documentation for detailed information.

Differential Revision: https://reviews.llvm.org/D55483

llvm-svn: 351629
2019-01-19 05:36:54 +00:00
..
AnalysisBasedWarnings.cpp [AST] RecursiveASTVisitor visits lambda classes when implicit visitation is on. 2019-01-14 10:31:42 +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 [CodeComplete] Set preferred type to bool on conditions 2018-12-13 15:36:32 +00:00
CoroutineStmtBuilder.h
DeclSpec.cpp Use DeclSpec for quals in DeclaratorChunk::FunctionTypeInfo. 2019-01-09 11:25:09 +00:00
DelayedDiagnostic.cpp
IdentifierResolver.cpp
JumpDiagnostics.cpp
MultiplexExternalSemaSource.cpp
ParsedAttr.cpp Allow a double-underscore spelling of Clang attributes using double square bracket syntax. 2018-11-09 19:37:18 +00:00
Scope.cpp
ScopeInfo.cpp
Sema.cpp [AST][NFC] Pass the AST context to one of the ctor of DeclRefExpr. 2018-12-21 14:10:18 +00:00
SemaAccess.cpp [CodeComplete] Fix a crash in access checks of inner classes 2018-12-05 17:38:39 +00:00
SemaAttr.cpp Add support for namespaces on #pragma clang attribute 2018-12-20 22:32:04 +00:00
SemaCUDA.cpp [AST][NFC] Pass the AST context to one of the ctor of DeclRefExpr. 2018-12-21 14:10:18 +00:00
SemaCXXScopeSpec.cpp
SemaCast.cpp Revert "Revert r347417 "Re-Reinstate 347294 with a fix for the failures."" 2018-11-30 23:41:18 +00:00
SemaChecking.cpp [Fixed Point Arithmetic] Fixed Point Addition Constant Expression Evaluation 2019-01-18 21:04:25 +00:00
SemaCodeComplete.cpp [Sema][NFC] Fix Wimplicit-fallthrough warning in getCursorKindForDecl 2018-12-21 17:52:13 +00:00
SemaConsumer.cpp
SemaCoroutine.cpp [AST] Remove ASTContext from getThisType (NFC) 2019-01-11 01:54:53 +00:00
SemaDecl.cpp Emit !callback metadata and introduce the callback attribute 2019-01-19 05:36:54 +00:00
SemaDeclAttr.cpp Emit !callback metadata and introduce the callback attribute 2019-01-19 05:36:54 +00:00
SemaDeclCXX.cpp [OpenCL] Set generic addr space of 'this' in special class members. 2019-01-14 11:44:22 +00:00
SemaDeclObjC.cpp Misc typos fixes in ./lib folder 2018-12-10 12:37:46 +00:00
SemaExceptionSpec.cpp Create ConstantExpr class 2018-10-31 03:48:47 +00:00
SemaExpr.cpp [Fixed Point Arithmetic] Fixed Point Addition 2019-01-16 18:13:59 +00:00
SemaExprCXX.cpp [SemaCXX] Unconfuse Clang when std::align_val_t is unscoped in C++03 2019-01-16 02:34:36 +00:00
SemaExprMember.cpp [Sema/Attribute] Check for noderef attribute 2018-12-06 01:05:54 +00:00
SemaExprObjC.cpp [Sema] Call CheckPlaceholderExpr to resolve typeof or decltype 2019-01-10 20:12:16 +00:00
SemaFixItUtils.cpp
SemaInit.cpp Add -Wctad-maybe-unsupported to diagnose CTAD on types with no user defined deduction guides. 2019-01-17 21:44:24 +00:00
SemaLambda.cpp [Sema] If CheckPlaceholderExpr rewrites the initializer of an auto 2019-01-11 04:57:34 +00:00
SemaLookup.cpp PR40329: [adl] Fix determination of associated classes when searching a 2019-01-16 22:01:39 +00:00
SemaObjCProperty.cpp [AST][NFC] Pass the AST context to one of the ctor of DeclRefExpr. 2018-12-21 14:10:18 +00:00
SemaOpenMP.cpp [OpenMP] Avoid remainder operations for loop index values on a collapsed loop nest. 2019-01-09 20:45:26 +00:00
SemaOverload.cpp [OpenCL] Fix overloading ranking rules for addrspace conversions. 2019-01-18 11:38:16 +00:00
SemaPseudoObject.cpp
SemaStmt.cpp Refactor the way we handle diagnosing unused expression results. 2019-01-04 16:58:14 +00:00
SemaStmtAsm.cpp Use "EvaluateAsRValue" instead of as a known int, because if it's not a known 2018-12-19 04:54:29 +00:00
SemaStmtAttr.cpp Add two new pragmas for controlling software pipelining optimizations. 2019-01-04 17:20:00 +00:00
SemaTemplate.cpp [Fixed Point Arithmetic] Add APFixedPoint to APValue 2019-01-16 18:53:05 +00:00
SemaTemplateDeduction.cpp [Sema] Call CheckPlaceholderExpr to resolve typeof or decltype 2019-01-10 20:12:16 +00:00
SemaTemplateInstantiate.cpp [OpenCL] Add generic AS to 'this' pointer 2018-12-13 10:15:27 +00:00
SemaTemplateInstantiateDecl.cpp Remember to instantiate explicit template argument lists in a friend 2019-01-11 01:59:33 +00:00
SemaTemplateVariadic.cpp [SemaCXX] Fix ICE for unexpanded parameter pack 2019-01-07 03:25:59 +00:00
SemaType.cpp [OpenCL] Set generic addr space of 'this' in special class members. 2019-01-14 11:44:22 +00:00
TreeTransform.h Refactor the way we handle diagnosing unused expression results. 2019-01-04 16:58:14 +00:00
TypeLocBuilder.cpp
TypeLocBuilder.h