llvm-project/clang/lib/AST
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
..
APValue.cpp [Fixed Point Arithmetic] Add APFixedPoint to APValue 2019-01-16 18:53:05 +00:00
ASTConsumer.cpp
ASTContext.cpp Emit !callback metadata and introduce the callback attribute 2019-01-19 05:36:54 +00:00
ASTDiagnostic.cpp [Basic] Extend DiagnosticEngine to store and format Qualifiers. 2019-01-04 11:50:36 +00:00
ASTDumper.cpp [ASTDump] NFC: Move variable into if() statement 2019-01-18 22:15:09 +00:00
ASTImporter.cpp [AST] Store some data of CXXNewExpr as trailing objects 2019-01-07 15:04:45 +00:00
ASTImporterLookupTable.cpp [ASTImporter] Add importer specific lookup 2018-12-17 13:53:12 +00:00
ASTStructuralEquivalence.cpp Misc typos fixes in ./lib folder 2018-12-10 12:37:46 +00:00
ASTTypeTraits.cpp Teach clang-query to dump types. I couldn't find any existing tests for clang-query's dumping functionality. =( 2016-11-02 23:57:18 +00:00
AttrImpl.cpp
CMakeLists.txt [ASTImporter] Add importer specific lookup 2018-12-17 13:53:12 +00:00
CXXABI.h Fix __has_unique_object_representations implementation 2017-11-30 16:37:02 +00:00
CXXInheritance.cpp [AST][NFC] Remove stale comment in CXXRecordDecl::is(Virtually)DerivedFrom. 2018-12-21 20:23:07 +00:00
Comment.cpp Remove trailing space 2018-07-30 19:24:48 +00:00
CommentBriefParser.cpp Remove \brief commands from doxygen comments. 2018-05-09 01:00:01 +00:00
CommentCommandTraits.cpp
CommentLexer.cpp Add a newline to SourceLocation dump output 2018-08-15 20:32:06 +00:00
CommentParser.cpp Remove spurious assertion in -Wdocumentation 2018-10-02 22:23:27 +00:00
CommentSema.cpp Port getLocEnd -> getEndLoc 2018-08-09 21:09:38 +00:00
ComparisonCategories.cpp [C++2a] Implement operator<=>: Address bugs and post-commit review comments after r331677. 2018-05-08 00:52:19 +00:00
DataCollection.cpp [analyzer] Make StmtDataCollector customizable 2017-08-23 16:28:26 +00:00
Decl.cpp Diagnose an unused result from a call through a function pointer whose return type is marked [[nodiscard]]. 2019-01-03 14:24:31 +00:00
DeclBase.cpp DR674, PR38883, PR40238: Qualified friend lookup should look for a 2019-01-07 06:00:46 +00:00
DeclCXX.cpp [AST] Remove ASTContext from getThisType (NFC) 2019-01-11 01:54:53 +00:00
DeclFriend.cpp [AST] Fix some Clang-tidy modernize-use-auto warnings; other minor fixes (NFC). 2018-04-03 00:11:50 +00:00
DeclGroup.cpp [AST] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-11-10 00:59:22 +00:00
DeclObjC.cpp [Sema][ObjC] Infer availability of +new from availability of -init. 2018-09-10 22:20:09 +00:00
DeclOpenMP.cpp [OPENMP] Add support for OMP5 requires directive + unified_address clause 2018-09-26 04:28:39 +00:00
DeclPrinter.cpp Add support for 'atomic_default_mem_order' clause on 'requires' directive. Also renamed test files relating to 'requires'. Differntial review: https://reviews.llvm.org/D53513 2018-11-02 12:18:11 +00:00
DeclTemplate.cpp Add vtable anchor to classes. 2018-12-29 02:02:30 +00:00
DeclarationName.cpp [AST] Various optimizations + refactoring in DeclarationName(Table) 2018-09-21 12:53:22 +00:00
Expr.cpp [OpenCL] Set generic addr space of 'this' in special class members. 2019-01-14 11:44:22 +00:00
ExprCXX.cpp [AST] Move back BasePathSize to the bit-fields of CastExpr 2019-01-09 16:41:33 +00:00
ExprClassification.cpp Create ConstantExpr class 2018-10-31 03:48:47 +00:00
ExprConstant.cpp [Fixed Point Arithmetic] Fixed Point Addition Constant Expression Evaluation 2019-01-18 21:04:25 +00:00
ExprObjC.cpp [AST] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-11-30 22:33:48 +00:00
ExternalASTMerger.cpp Set MustBuildLookupTable on PrimaryContext in ExternalASTMerger 2018-11-29 13:50:30 +00:00
ExternalASTSource.cpp Remove trailing space 2018-07-30 19:24:48 +00:00
FormatString.cpp OpenCL: Improve vector printf warnings 2018-12-01 22:16:27 +00:00
FormatStringParsing.h OpenCL: Improve vector printf warnings 2018-12-01 22:16:27 +00:00
InheritViz.cpp
ItaniumCXXABI.cpp Remove trailing space 2018-07-30 19:24:48 +00:00
ItaniumMangle.cpp [mingw] Don't mangle thiscall like fastcall etc 2018-12-21 01:40:29 +00:00
Linkage.h [AST] Squeeze some bits in LinkageComputer::QueryType 2018-09-25 13:43:25 +00:00
Mangle.cpp NFC: Remove MANGLE_CHECKER from ItaniumMangle.cpp 2018-10-23 19:55:38 +00:00
MicrosoftCXXABI.cpp Remove \brief commands from doxygen comments. 2018-05-09 01:00:01 +00:00
MicrosoftMangle.cpp [MS] Mangle return adjusting thunks with the public access specifier 2018-12-26 20:07:52 +00:00
NSAPI.cpp [OpenCL] Add support of cl_intel_device_side_avc_motion_estimation extension 2018-11-08 11:25:41 +00:00
NestedNameSpecifier.cpp NFC: Replace asserts with if() in SourceLocation accessors 2019-01-07 21:57:30 +00:00
ODRHash.cpp Misc typos fixes in ./lib folder 2018-12-10 12:37:46 +00:00
OSLog.cpp os_log: Allow specifying mask type in format string. 2018-11-06 07:05:14 +00:00
OpenMPClause.cpp [OPENMP] parsing and sema support for 'close' map-type-modifier 2018-12-18 22:18:41 +00:00
ParentMap.cpp Create ConstantExpr class 2018-10-31 03:48:47 +00:00
PrintfFormatString.cpp OpenCL: Improve vector printf warnings 2018-12-01 22:16:27 +00:00
QualTypeNames.cpp Remove \brief commands from doxygen comments. 2018-05-09 01:00:01 +00:00
RawCommentList.cpp Misc typos fixes in ./lib folder 2018-12-10 12:37:46 +00:00
RecordLayout.cpp Remove trailing space 2018-07-30 19:24:48 +00:00
RecordLayoutBuilder.cpp Fix up diagnostics. 2018-12-14 03:35:10 +00:00
ScanfFormatString.cpp Fix a pair of Wfallthrough warnings in ScanfFormatString. 2019-01-11 18:01:40 +00:00
SelectorLocationsKind.cpp Port getLocStart -> getBeginLoc 2018-08-09 21:08:08 +00:00
Stmt.cpp [AST] Assert that no statement/expression class is polymorphic 2018-12-04 16:04:19 +00:00
StmtCXX.cpp [cxx2a] P0614R1: Support init-statements in range-based for loops. 2018-09-28 18:44:09 +00:00
StmtIterator.cpp [AST] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-11-21 23:26:08 +00:00
StmtObjC.cpp Port getLocEnd -> getEndLoc 2018-08-09 21:09:38 +00:00
StmtOpenMP.cpp [OpenMP][NVPTX] Use single loops when generating code for distribute parallel for 2018-10-29 15:45:47 +00:00
StmtPrinter.cpp Create ConstantExpr class 2018-10-31 03:48:47 +00:00
StmtProfile.cpp Add support for 'atomic_default_mem_order' clause on 'requires' directive. Also renamed test files relating to 'requires'. Differntial review: https://reviews.llvm.org/D53513 2018-11-02 12:18:11 +00:00
StmtViz.cpp
TemplateBase.cpp Remove trailing space 2018-07-30 19:24:48 +00:00
TemplateName.cpp Remove trailing space 2018-07-30 19:24:48 +00:00
TextNodeDumper.cpp [ASTDump] Mark variadic declarations with a tag instead of child node 2019-01-18 21:38:30 +00:00
Type.cpp [Fixed Point Arithmetic] Add APFixedPoint to APValue 2019-01-16 18:53:05 +00:00
TypeLoc.cpp [OpenCL] Add support of cl_intel_device_side_avc_motion_estimation extension 2018-11-08 11:25:41 +00:00
TypePrinter.cpp [Sema] Better static assert diagnostics for expressions involving temporaries/casts/.... 2018-12-20 09:05:15 +00:00
VTTBuilder.cpp Remove trailing space 2018-07-30 19:24:48 +00:00
VTableBuilder.cpp Use llvm::{all,any,none}_of instead std::{all,any,none}_of. NFC 2018-10-20 17:53:42 +00:00