|
clang 22.0.0git
|
#include "clang/CIR/Dialect/IR/CIRDialect.h"#include "clang/CIR/Dialect/IR/CIRAttrs.h"#include "clang/CIR/Dialect/IR/CIROpsEnums.h"#include "clang/CIR/Dialect/IR/CIRTypes.h"#include "mlir/IR/Attributes.h"#include "mlir/IR/DialectImplementation.h"#include "mlir/Interfaces/ControlFlowInterfaces.h"#include "mlir/Interfaces/FunctionImplementation.h"#include "mlir/Support/LLVM.h"#include "clang/CIR/Dialect/IR/CIROpsDialect.cpp.inc"#include "clang/CIR/Dialect/IR/CIROpsEnums.cpp.inc"#include "clang/CIR/MissingFeatures.h"#include "llvm/ADT/SetOperations.h"#include "llvm/ADT/SmallSet.h"#include "llvm/Support/LogicalResult.h"#include "clang/CIR/Dialect/IR/CIROps.cpp.inc"Go to the source code of this file.
Macros | |
| #define | GET_OP_LIST |
| #define | REGISTER_ENUM_TYPE(Ty) |
| #define | GET_OP_CLASSES |
Functions | |
| static int | parseOptionalKeywordAlternative (AsmParser &parser, ArrayRef< llvm::StringRef > keywords) |
| template<typename EnumTy, typename RetTy = EnumTy> | |
| static RetTy | parseOptionalCIRKeyword (AsmParser &parser, EnumTy defaultValue) |
| Parse an enum from the keyword, or default to the provided default value. | |
| template<typename EnumTy, typename RetTy = EnumTy> | |
| static ParseResult | parseCIRKeyword (AsmParser &parser, RetTy &result) |
| Parse an enum from the keyword, return failure if the keyword is not found. | |
| static LogicalResult | ensureRegionTerm (OpAsmParser &parser, Region ®ion, SMLoc errLoc) |
| static bool | omitRegionTerm (mlir::Region &r) |
| void | printVisibilityAttr (OpAsmPrinter &printer, cir::VisibilityAttr &visibility) |
| void | parseVisibilityAttr (OpAsmParser &parser, cir::VisibilityAttr &visibility) |
| ParseResult | parseInlineKindAttr (OpAsmParser &parser, cir::InlineKindAttr &inlineKindAttr) |
| void | printInlineKindAttr (OpAsmPrinter &p, cir::InlineKindAttr inlineKindAttr) |
| static mlir::ParseResult | parseOmittedTerminatorRegion (mlir::OpAsmParser &parser, mlir::Region ®ion) |
| static void | printOmittedTerminatorRegion (mlir::OpAsmPrinter &printer, cir::ScopeOp &op, mlir::Region ®ion) |
| static LogicalResult | checkConstantTypes (mlir::Operation *op, mlir::Type opType, mlir::Attribute attrType) |
| static bool | isIntOrBoolCast (cir::CastOp op) |
| static Value | tryFoldCastChain (cir::CastOp op) |
| static mlir::ParseResult | parseTryCallDestinations (mlir::OpAsmParser &parser, mlir::OperationState &result) |
| static mlir::ParseResult | parseCallCommon (mlir::OpAsmParser &parser, mlir::OperationState &result, bool hasDestinationBlocks=false) |
| static void | printCallCommon (mlir::Operation *op, mlir::FlatSymbolRefAttr calleeSym, mlir::Value indirectCallee, mlir::OpAsmPrinter &printer, bool isNothrow, cir::SideEffect sideEffect, mlir::Block *normalDest=nullptr, mlir::Block *unwindDest=nullptr) |
| static LogicalResult | verifyCallCommInSymbolUses (mlir::Operation *op, SymbolTableCollection &symbolTable) |
| static mlir::LogicalResult | checkReturnAndFunction (cir::ReturnOp op, cir::FuncOp function) |
| ParseResult | parseIndirectBrOpSucessors (OpAsmParser &parser, Type &flagType, SmallVectorImpl< Block * > &succOperandBlocks, SmallVectorImpl< SmallVector< OpAsmParser::UnresolvedOperand > > &succOperands, SmallVectorImpl< SmallVector< Type > > &succOperandsTypes) |
| void | printIndirectBrOpSucessors (OpAsmPrinter &p, cir::IndirectBrOp op, Type flagType, SuccessorRange succs, OperandRangeRange succOperands, const TypeRangeRange &succOperandsTypes) |
| static ParseResult | parseSwitchOp (OpAsmParser &parser, mlir::Region ®ions, mlir::OpAsmParser::UnresolvedOperand &cond, mlir::Type &condType) |
| static void | printSwitchOp (OpAsmPrinter &p, cir::SwitchOp op, mlir::Region &bodyRegion, mlir::Value condition, mlir::Type condType) |
| static ParseResult | parseSwitchFlatOpCases (OpAsmParser &parser, Type flagType, mlir::ArrayAttr &caseValues, SmallVectorImpl< Block * > &caseDestinations, SmallVectorImpl< llvm::SmallVector< OpAsmParser::UnresolvedOperand > > &caseOperands, SmallVectorImpl< llvm::SmallVector< Type > > &caseOperandTypes) |
| <cases> ::= [ (case (, case )* )? | |
| static void | printSwitchFlatOpCases (OpAsmPrinter &p, cir::SwitchFlatOp op, Type flagType, mlir::ArrayAttr caseValues, SuccessorRange caseDestinations, OperandRangeRange caseOperands, const TypeRangeRange &caseOperandTypes) |
| static ParseResult | parseConstantValue (OpAsmParser &parser, mlir::Attribute &valueAttr) |
| static void | printConstant (OpAsmPrinter &p, Attribute value) |
| static void | printGlobalOpTypeAndInitialValue (OpAsmPrinter &p, cir::GlobalOp op, TypeAttr type, Attribute initAttr, mlir::Region &ctorRegion, mlir::Region &dtorRegion) |
| static ParseResult | parseGlobalOpTypeAndInitialValue (OpAsmParser &parser, TypeAttr &typeAttr, Attribute &initialValueAttr, mlir::Region &ctorRegion, mlir::Region &dtorRegion) |
| static llvm::StringRef | getLinkageAttrNameString () |
| Returns the name used for the linkage attribute. | |
| static bool | isBoolNot (cir::UnaryOp op) |
| static OpFoldResult | foldUnaryBitOp (mlir::Attribute inputAttr, llvm::function_ref< llvm::APInt(const llvm::APInt &)> func, bool poisonZero=false) |
| static void | printTryHandlerRegions (mlir::OpAsmPrinter &printer, cir::TryOp op, mlir::MutableArrayRef< mlir::Region > handlerRegions, mlir::ArrayAttr handlerTypes) |
| static mlir::ParseResult | parseTryHandlerRegions (mlir::OpAsmParser &parser, llvm::SmallVectorImpl< std::unique_ptr< mlir::Region > > &handlerRegions, mlir::ArrayAttr &handlerTypes) |
| #define GET_OP_CLASSES |
Definition at line 3471 of file CIRDialect.cpp.
| #define GET_OP_LIST |
| #define REGISTER_ENUM_TYPE | ( | Ty | ) |
Definition at line 123 of file CIRDialect.cpp.
|
static |
Definition at line 351 of file CIRDialect.cpp.
|
static |
Definition at line 1030 of file CIRDialect.cpp.
|
static |
Definition at line 167 of file CIRDialect.cpp.
Referenced by parseGlobalOpTypeAndInitialValue(), and parseOmittedTerminatorRegion().
|
static |
Definition at line 2957 of file CIRDialect.cpp.
|
static |
Returns the name used for the linkage attribute.
This must correspond to the name of the attribute in ODS.
Definition at line 1827 of file CIRDialect.cpp.
|
static |
Definition at line 2399 of file CIRDialect.cpp.
|
static |
Definition at line 658 of file CIRDialect.cpp.
Referenced by tryFoldCastChain().
|
static |
Definition at line 194 of file CIRDialect.cpp.
Referenced by printOmittedTerminatorRegion().
|
static |
Definition at line 778 of file CIRDialect.cpp.
References parseCIRKeyword(), and parseTryCallDestinations().
|
static |
Parse an enum from the keyword, return failure if the keyword is not found.
Definition at line 153 of file CIRDialect.cpp.
References parseOptionalKeywordAlternative().
Referenced by parseCallCommon().
|
static |
Definition at line 1545 of file CIRDialect.cpp.
Referenced by parseGlobalOpTypeAndInitialValue().
|
static |
Definition at line 1665 of file CIRDialect.cpp.
References ensureRegionTerm(), and parseConstantValue().
| ParseResult parseIndirectBrOpSucessors | ( | OpAsmParser & | parser, |
| Type & | flagType, | ||
| SmallVectorImpl< Block * > & | succOperandBlocks, | ||
| SmallVectorImpl< SmallVector< OpAsmParser::UnresolvedOperand > > & | succOperands, | ||
| SmallVectorImpl< SmallVector< Type > > & | succOperandsTypes ) |
Definition at line 1260 of file CIRDialect.cpp.
| ParseResult parseInlineKindAttr | ( | OpAsmParser & | parser, |
| cir::InlineKindAttr & | inlineKindAttr ) |
Definition at line 227 of file CIRDialect.cpp.
|
static |
Definition at line 262 of file CIRDialect.cpp.
References ensureRegionTerm().
|
static |
Parse an enum from the keyword, or default to the provided default value.
The return type is the enum type by default, unless overriden with the second template argument.
Definition at line 140 of file CIRDialect.cpp.
References parseOptionalKeywordAlternative().
Referenced by parseVisibilityAttr().
|
static |
Definition at line 111 of file CIRDialect.cpp.
Referenced by parseCIRKeyword(), and parseOptionalCIRKeyword().
|
static |
<cases> ::= [ (case (, case )* )?
] <case> ::= integer : bb-id (( ssa-use-and-type-list ))?
Definition at line 1468 of file CIRDialect.cpp.
|
static |
Definition at line 1356 of file CIRDialect.cpp.
|
static |
Definition at line 760 of file CIRDialect.cpp.
Referenced by parseCallCommon().
|
static |
Definition at line 3388 of file CIRDialect.cpp.
| void parseVisibilityAttr | ( | OpAsmParser & | parser, |
| cir::VisibilityAttr & | visibility ) |
Definition at line 217 of file CIRDialect.cpp.
References parseOptionalCIRKeyword().
|
static |
Definition at line 847 of file CIRDialect.cpp.
|
static |
Definition at line 1551 of file CIRDialect.cpp.
Referenced by printGlobalOpTypeAndInitialValue().
|
static |
Definition at line 1634 of file CIRDialect.cpp.
References printConstant().
| void printIndirectBrOpSucessors | ( | OpAsmPrinter & | p, |
| cir::IndirectBrOp | op, | ||
| Type | flagType, | ||
| SuccessorRange | succs, | ||
| OperandRangeRange | succOperands, | ||
| const TypeRangeRange & | succOperandsTypes ) |
Definition at line 1292 of file CIRDialect.cpp.
| void printInlineKindAttr | ( | OpAsmPrinter & | p, |
| cir::InlineKindAttr | inlineKindAttr ) |
Definition at line 253 of file CIRDialect.cpp.
|
static |
Definition at line 272 of file CIRDialect.cpp.
References omitRegionTerm().
|
static |
Definition at line 1511 of file CIRDialect.cpp.
|
static |
Definition at line 1380 of file CIRDialect.cpp.
|
static |
Definition at line 3362 of file CIRDialect.cpp.
| void printVisibilityAttr | ( | OpAsmPrinter & | printer, |
| cir::VisibilityAttr & | visibility ) |
Definition at line 203 of file CIRDialect.cpp.
|
static |
Definition at line 664 of file CIRDialect.cpp.
References isIntOrBoolCast().
|
static |
Definition at line 911 of file CIRDialect.cpp.
References cir::MissingFeatures::opCallCallConv().