llvm-project/clang/lib/Parse
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
..
CMakeLists.txt
ParseAST.cpp [clang-cl, PCH] Support for /Yc and /Yu without filename and #pragma hdrstop 2018-09-11 17:10:44 +00:00
ParseCXXInlineMethods.cpp [OpenCL] Add generic AS to 'this' pointer 2018-12-13 10:15:27 +00:00
ParseDecl.cpp Emit !callback metadata and introduce the callback attribute 2019-01-19 05:36:54 +00:00
ParseDeclCXX.cpp Use DeclSpec for quals in DeclaratorChunk::FunctionTypeInfo. 2019-01-09 11:25:09 +00:00
ParseExpr.cpp Use DeclSpec for quals in DeclaratorChunk::FunctionTypeInfo. 2019-01-09 11:25:09 +00:00
ParseExprCXX.cpp Use DeclSpec for quals in DeclaratorChunk::FunctionTypeInfo. 2019-01-09 11:25:09 +00:00
ParseInit.cpp NFC: Remove the ObjC1/ObjC2 distinction from clang (and related projects) 2018-10-30 20:31:30 +00:00
ParseObjc.cpp Refactor the way we handle diagnosing unused expression results. 2019-01-04 16:58:14 +00:00
ParseOpenMP.cpp Refactor the way we handle diagnosing unused expression results. 2019-01-04 16:58:14 +00:00
ParsePragma.cpp Add two new pragmas for controlling software pipelining optimizations. 2019-01-04 17:20:00 +00:00
ParseStmt.cpp Refactor the way we handle diagnosing unused expression results. 2019-01-04 16:58:14 +00:00
ParseStmtAsm.cpp Remove trailing space 2018-07-30 19:24:48 +00:00
ParseTemplate.cpp [MS] Push outermost class DeclContexts only in -fdelayed-template-parsing 2018-11-27 21:20:42 +00:00
ParseTentative.cpp Fix clang -Wimplicit-fallthrough warnings across llvm, NFC 2018-11-01 19:54:45 +00:00
Parser.cpp Misc typos fixes in ./lib folder 2018-12-10 12:37:46 +00:00