10b57cec5SDimitry Andric //===- TableGenBackends.h - Declarations for Clang TableGen Backends ------===// 20b57cec5SDimitry Andric // 30b57cec5SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 40b57cec5SDimitry Andric // See https://llvm.org/LICENSE.txt for license information. 50b57cec5SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 60b57cec5SDimitry Andric // 70b57cec5SDimitry Andric //===----------------------------------------------------------------------===// 80b57cec5SDimitry Andric // 90b57cec5SDimitry Andric // This file contains the declarations for all of the Clang TableGen 100b57cec5SDimitry Andric // backends. A "TableGen backend" is just a function. See 110b57cec5SDimitry Andric // "$LLVM_ROOT/utils/TableGen/TableGenBackends.h" for more info. 120b57cec5SDimitry Andric // 130b57cec5SDimitry Andric //===----------------------------------------------------------------------===// 140b57cec5SDimitry Andric 150b57cec5SDimitry Andric #ifndef LLVM_CLANG_UTILS_TABLEGEN_TABLEGENBACKENDS_H 160b57cec5SDimitry Andric #define LLVM_CLANG_UTILS_TABLEGEN_TABLEGENBACKENDS_H 170b57cec5SDimitry Andric 180b57cec5SDimitry Andric #include <string> 190b57cec5SDimitry Andric 200b57cec5SDimitry Andric namespace llvm { 210b57cec5SDimitry Andric class raw_ostream; 220b57cec5SDimitry Andric class RecordKeeper; 230b57cec5SDimitry Andric } // namespace llvm 240b57cec5SDimitry Andric 250b57cec5SDimitry Andric namespace clang { 260b57cec5SDimitry Andric 270b57cec5SDimitry Andric void EmitClangDeclContext(llvm::RecordKeeper &RK, llvm::raw_ostream &OS); 281db9f3b2SDimitry Andric /** 291db9f3b2SDimitry Andric @param PriorizeIfSubclassOf These classes should be prioritized in the output. 301db9f3b2SDimitry Andric This is useful to force enum generation/jump tables/lookup tables to be more 311db9f3b2SDimitry Andric compact in both size and surrounding code in hot functions. An example use is 321db9f3b2SDimitry Andric in Decl for classes that inherit from DeclContext, for functions like 331db9f3b2SDimitry Andric castFromDeclContext. 341db9f3b2SDimitry Andric */ 350b57cec5SDimitry Andric void EmitClangASTNodes(llvm::RecordKeeper &RK, llvm::raw_ostream &OS, 361db9f3b2SDimitry Andric const std::string &N, const std::string &S, 371db9f3b2SDimitry Andric std::string_view PriorizeIfSubclassOf = ""); 38480093f4SDimitry Andric void EmitClangBasicReader(llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 39480093f4SDimitry Andric void EmitClangBasicWriter(llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 40a7dea167SDimitry Andric void EmitClangTypeNodes(llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 41480093f4SDimitry Andric void EmitClangTypeReader(llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 42480093f4SDimitry Andric void EmitClangTypeWriter(llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 430b57cec5SDimitry Andric void EmitClangAttrParserStringSwitches(llvm::RecordKeeper &Records, 440b57cec5SDimitry Andric llvm::raw_ostream &OS); 450b57cec5SDimitry Andric void EmitClangAttrSubjectMatchRulesParserStringSwitches( 460b57cec5SDimitry Andric llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 470b57cec5SDimitry Andric void EmitClangAttrClass(llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 480b57cec5SDimitry Andric void EmitClangAttrImpl(llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 490b57cec5SDimitry Andric void EmitClangAttrList(llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 500b57cec5SDimitry Andric void EmitClangAttrSubjectMatchRuleList(llvm::RecordKeeper &Records, 510b57cec5SDimitry Andric llvm::raw_ostream &OS); 520b57cec5SDimitry Andric void EmitClangAttrPCHRead(llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 530b57cec5SDimitry Andric void EmitClangAttrPCHWrite(llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 547a6dacacSDimitry Andric void EmitClangRegularKeywordAttributeInfo(llvm::RecordKeeper &Records, 5506c3fb27SDimitry Andric llvm::raw_ostream &OS); 560b57cec5SDimitry Andric void EmitClangAttrHasAttrImpl(llvm::RecordKeeper &Records, 570b57cec5SDimitry Andric llvm::raw_ostream &OS); 580b57cec5SDimitry Andric void EmitClangAttrSpellingListIndex(llvm::RecordKeeper &Records, 590b57cec5SDimitry Andric llvm::raw_ostream &OS); 600b57cec5SDimitry Andric void EmitClangAttrASTVisitor(llvm::RecordKeeper &Records, 610b57cec5SDimitry Andric llvm::raw_ostream &OS); 620b57cec5SDimitry Andric void EmitClangAttrTemplateInstantiate(llvm::RecordKeeper &Records, 630b57cec5SDimitry Andric llvm::raw_ostream &OS); 640b57cec5SDimitry Andric void EmitClangAttrParsedAttrList(llvm::RecordKeeper &Records, 650b57cec5SDimitry Andric llvm::raw_ostream &OS); 660b57cec5SDimitry Andric void EmitClangAttrParsedAttrImpl(llvm::RecordKeeper &Records, 670b57cec5SDimitry Andric llvm::raw_ostream &OS); 680b57cec5SDimitry Andric void EmitClangAttrParsedAttrKinds(llvm::RecordKeeper &Records, 690b57cec5SDimitry Andric llvm::raw_ostream &OS); 700b57cec5SDimitry Andric void EmitClangAttrTextNodeDump(llvm::RecordKeeper &Records, 710b57cec5SDimitry Andric llvm::raw_ostream &OS); 720b57cec5SDimitry Andric void EmitClangAttrNodeTraverse(llvm::RecordKeeper &Records, 730b57cec5SDimitry Andric llvm::raw_ostream &OS); 74349cc55cSDimitry Andric void EmitClangAttrDocTable(llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 750b57cec5SDimitry Andric 76*0fca6ea1SDimitry Andric void EmitClangBuiltins(llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 77*0fca6ea1SDimitry Andric 780b57cec5SDimitry Andric void EmitClangDiagsDefs(llvm::RecordKeeper &Records, llvm::raw_ostream &OS, 790b57cec5SDimitry Andric const std::string &Component); 800b57cec5SDimitry Andric void EmitClangDiagGroups(llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 810b57cec5SDimitry Andric void EmitClangDiagsIndexName(llvm::RecordKeeper &Records, 820b57cec5SDimitry Andric llvm::raw_ostream &OS); 830b57cec5SDimitry Andric 840b57cec5SDimitry Andric void EmitClangSACheckers(llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 850b57cec5SDimitry Andric 860b57cec5SDimitry Andric void EmitClangCommentHTMLTags(llvm::RecordKeeper &Records, 870b57cec5SDimitry Andric llvm::raw_ostream &OS); 880b57cec5SDimitry Andric void EmitClangCommentHTMLTagsProperties(llvm::RecordKeeper &Records, 890b57cec5SDimitry Andric llvm::raw_ostream &OS); 900b57cec5SDimitry Andric void EmitClangCommentHTMLNamedCharacterReferences(llvm::RecordKeeper &Records, 910b57cec5SDimitry Andric llvm::raw_ostream &OS); 920b57cec5SDimitry Andric 930b57cec5SDimitry Andric void EmitClangCommentCommandInfo(llvm::RecordKeeper &Records, 940b57cec5SDimitry Andric llvm::raw_ostream &OS); 950b57cec5SDimitry Andric void EmitClangCommentCommandList(llvm::RecordKeeper &Records, 960b57cec5SDimitry Andric llvm::raw_ostream &OS); 97a7dea167SDimitry Andric void EmitClangOpcodes(llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 980b57cec5SDimitry Andric 99e8d8bef9SDimitry Andric void EmitClangSyntaxNodeList(llvm::RecordKeeper &Records, 100e8d8bef9SDimitry Andric llvm::raw_ostream &OS); 101e8d8bef9SDimitry Andric void EmitClangSyntaxNodeClasses(llvm::RecordKeeper &Records, 102e8d8bef9SDimitry Andric llvm::raw_ostream &OS); 103e8d8bef9SDimitry Andric 1040b57cec5SDimitry Andric void EmitNeon(llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 1050b57cec5SDimitry Andric void EmitFP16(llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 1065ffd83dbSDimitry Andric void EmitBF16(llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 1070b57cec5SDimitry Andric void EmitNeonSema(llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 1085f757f3fSDimitry Andric void EmitVectorTypes(llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 1090b57cec5SDimitry Andric void EmitNeonTest(llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 1100b57cec5SDimitry Andric 1115ffd83dbSDimitry Andric void EmitSveHeader(llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 1125ffd83dbSDimitry Andric void EmitSveBuiltins(llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 1135ffd83dbSDimitry Andric void EmitSveBuiltinCG(llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 1145ffd83dbSDimitry Andric void EmitSveTypeFlags(llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 1155ffd83dbSDimitry Andric void EmitSveRangeChecks(llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 116cb14a3feSDimitry Andric void EmitSveStreamingAttrs(llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 1175ffd83dbSDimitry Andric 11806c3fb27SDimitry Andric void EmitSmeHeader(llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 11906c3fb27SDimitry Andric void EmitSmeBuiltins(llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 12006c3fb27SDimitry Andric void EmitSmeBuiltinCG(llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 12106c3fb27SDimitry Andric void EmitSmeRangeChecks(llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 122cb14a3feSDimitry Andric void EmitSmeStreamingAttrs(llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 123cb14a3feSDimitry Andric void EmitSmeBuiltinZAState(llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 12406c3fb27SDimitry Andric 125480093f4SDimitry Andric void EmitMveHeader(llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 126480093f4SDimitry Andric void EmitMveBuiltinDef(llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 127480093f4SDimitry Andric void EmitMveBuiltinSema(llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 128480093f4SDimitry Andric void EmitMveBuiltinCG(llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 129480093f4SDimitry Andric void EmitMveBuiltinAliases(llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 130480093f4SDimitry Andric 131fe6060f1SDimitry Andric void EmitRVVHeader(llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 132fe6060f1SDimitry Andric void EmitRVVBuiltins(llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 133fe6060f1SDimitry Andric void EmitRVVBuiltinCG(llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 134972a253aSDimitry Andric void EmitRVVBuiltinSema(llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 135fe6060f1SDimitry Andric 1365ffd83dbSDimitry Andric void EmitCdeHeader(llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 1375ffd83dbSDimitry Andric void EmitCdeBuiltinDef(llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 1385ffd83dbSDimitry Andric void EmitCdeBuiltinSema(llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 1395ffd83dbSDimitry Andric void EmitCdeBuiltinCG(llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 1405ffd83dbSDimitry Andric void EmitCdeBuiltinAliases(llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 1415ffd83dbSDimitry Andric 1420b57cec5SDimitry Andric void EmitClangAttrDocs(llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 1430b57cec5SDimitry Andric void EmitClangDiagDocs(llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 1440b57cec5SDimitry Andric void EmitClangOptDocs(llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 1450b57cec5SDimitry Andric 1460b57cec5SDimitry Andric void EmitClangOpenCLBuiltins(llvm::RecordKeeper &Records, 1470b57cec5SDimitry Andric llvm::raw_ostream &OS); 14806c3fb27SDimitry Andric void EmitClangOpenCLBuiltinHeader(llvm::RecordKeeper &Records, 14906c3fb27SDimitry Andric llvm::raw_ostream &OS); 150fe6060f1SDimitry Andric void EmitClangOpenCLBuiltinTests(llvm::RecordKeeper &Records, 151fe6060f1SDimitry Andric llvm::raw_ostream &OS); 1520b57cec5SDimitry Andric 1530b57cec5SDimitry Andric void EmitClangDataCollectors(llvm::RecordKeeper &Records, 1540b57cec5SDimitry Andric llvm::raw_ostream &OS); 1550b57cec5SDimitry Andric 1560b57cec5SDimitry Andric void EmitTestPragmaAttributeSupportedAttributes(llvm::RecordKeeper &Records, 1570b57cec5SDimitry Andric llvm::raw_ostream &OS); 1580b57cec5SDimitry Andric 1590b57cec5SDimitry Andric } // end namespace clang 1600b57cec5SDimitry Andric 1610b57cec5SDimitry Andric #endif 162