|
MLIR 24.0.0git
|
#include "mlir/Dialect/LLVMIR/LLVMCallOps.h"#include "IR/LLVMOps.h"#include "mlir/Dialect/LLVMIR/LLVMConstantOps.h"#include "mlir/Dialect/LLVMIR/LLVMConversionOps.h"#include "mlir/Dialect/LLVMIR/LLVMModuleOps.h"#include "mlir/IR/Builders.h"#include "mlir/IR/DialectImplementation.h"#include "llvm/ADT/STLExtras.h"#include <optional>#include "mlir/Dialect/LLVMIR/LLVMCallOps.cpp.inc"Go to the source code of this file.
Macros | |
| #define | GET_OP_CLASSES |
Functions | |
| static auto | processFMFAttr (ArrayRef< NamedAttribute > attrs) |
| static void | printOneOpBundle (OpAsmPrinter &p, OperandRange operands, TypeRange operandTypes, StringRef tag) |
| static ParseResult | parseOneOpBundle (OpAsmParser &p, SmallVector< SmallVector< OpAsmParser::UnresolvedOperand > > &opBundleOperands, SmallVector< SmallVector< Type > > &opBundleOperandTypes, SmallVector< Attribute > &opBundleTags) |
| static SmallVector< Type, 1 > | getCallOpResultTypes (LLVMFunctionType calleeType) |
| Gets the MLIR Op-like result types of a LLVMFunctionType. | |
| static TypeAttr | getCallOpVarCalleeType (LLVMFunctionType calleeType) |
| Gets the variadic callee type for a LLVMFunctionType. | |
| static LLVMFunctionType | getLLVMFuncType (MLIRContext *context, TypeRange results, ValueRange args) |
| Constructs a LLVMFunctionType from MLIR results and args. | |
| template<typename OpTy> | |
| static unsigned | getNumConsumedCalleeOperands (OpTy callOp) |
| Return the number of leading callee operands of callOp that the operation consumes instead of passing them to the callee. | |
| template<typename OpTy> | |
| static Operation::operand_range | getOperandsPassedToCallee (OpTy callOp) |
| Return the operands of callOp that are passed to the callee, including the variadic arguments in case of a call to a variadic callee. | |
| template<typename OpTy> | |
| static Operation::operand_range | getArgOperandsImpl (OpTy callOp) |
| Return the operands of callOp that correspond to the declared parameters of the callee, i.e., its CallOpInterface argument operands. | |
| template<typename OpTy> | |
| static LogicalResult | verifyCallOpDebugInfo (OpTy callOp, LLVMFuncOp callee) |
| Verify that an inlinable callsite of a debug-info-bearing function in a debug-info-bearing function has a debug location attached to it. | |
| template<typename OpTy> | |
| static LogicalResult | verifyCallOpVarCalleeType (OpTy callOp) |
| Verify that the parameter and return types of the variadic callee type match the callOp argument and result types. | |
| template<typename OpTy> | |
| static LogicalResult | verifyCallOpSymbolUses (OpTy callOp, SymbolTableCollection &symbolTable) |
| static ParseResult | parseCallTypeAndResolveOperands (OpAsmParser &parser, OperationState &result, bool isDirect, ArrayRef< OpAsmParser::UnresolvedOperand > operands, SmallVectorImpl< DictionaryAttr > &argAttrs, SmallVectorImpl< DictionaryAttr > &resultAttrs) |
| Parses the type of a call operation and resolves the operands if the parsing succeeds. | |
| static ParseResult | parseOptionalCallFuncPtr (OpAsmParser &parser, SmallVectorImpl< OpAsmParser::UnresolvedOperand > &operands) |
| Parses an optional function pointer operand before the call argument list for indirect calls, or stops parsing at the function identifier otherwise. | |
| static ParseResult | resolveOpBundleOperands (OpAsmParser &parser, SMLoc loc, OperationState &state, ArrayRef< SmallVector< OpAsmParser::UnresolvedOperand > > opBundleOperands, ArrayRef< SmallVector< Type > > opBundleOperandTypes, StringAttr opBundleSizesAttrName) |
| #define GET_OP_CLASSES |
Definition at line 1283 of file LLVMCallOps.cpp.
|
static |
Return the operands of callOp that correspond to the declared parameters of the callee, i.e., its CallOpInterface argument operands.
The variadic arguments of a call to a variadic callee are not included: they do not correspond to any argument of the callee. The callee does not receive them as block arguments but reads them with llvm.intr.vastart and friends, so in terms of CallOpInterface they are consumed operands rather than forwarded ones.
Definition at line 340 of file LLVMCallOps.cpp.
References getOperandsPassedToCallee().
|
static |
Gets the MLIR Op-like result types of a LLVMFunctionType.
Definition at line 139 of file LLVMCallOps.cpp.
|
static |
Gets the variadic callee type for a LLVMFunctionType.
Definition at line 148 of file LLVMCallOps.cpp.
|
static |
Constructs a LLVMFunctionType from MLIR results and args.
Definition at line 153 of file LLVMCallOps.cpp.
References mlir::ValueRange::getTypes().
|
static |
Return the number of leading callee operands of callOp that the operation consumes instead of passing them to the callee.
Definition at line 316 of file LLVMCallOps.cpp.
Referenced by getOperandsPassedToCallee().
|
static |
Return the operands of callOp that are passed to the callee, including the variadic arguments in case of a call to a variadic callee.
Definition at line 326 of file LLVMCallOps.cpp.
References getNumConsumedCalleeOperands().
Referenced by getArgOperandsImpl(), and verifyCallOpVarCalleeType().
|
static |
Parses the type of a call operation and resolves the operands if the parsing succeeds.
Returns failure otherwise.
Definition at line 579 of file LLVMCallOps.cpp.
References mlir::AsmParser::emitError(), mlir::AsmParser::getCurrentLocation(), mlir::AsmParser::getNameLoc(), mlir::AsmParser::parseColon(), mlir::call_interface_impl::parseFunctionSignature(), mlir::AsmParser::parseOptionalComma(), mlir::AsmParser::parseType(), mlir::OpAsmParser::resolveOperands(), result, and success().
|
static |
Definition at line 78 of file LLVMCallOps.cpp.
References mlir::AsmParser::emitError(), mlir::AsmParser::getContext(), mlir::AsmParser::getCurrentLocation(), mlir::AsmParser::parseColon(), mlir::AsmParser::parseLParen(), mlir::OpAsmParser::parseOperandList(), mlir::AsmParser::parseOptionalRParen(), mlir::AsmParser::parseRParen(), mlir::AsmParser::parseString(), mlir::AsmParser::parseTypeList(), and success().
|
static |
Parses an optional function pointer operand before the call argument list for indirect calls, or stops parsing at the function identifier otherwise.
Definition at line 630 of file LLVMCallOps.cpp.
References mlir::OptionalParseResult::has_value(), mlir::OpAsmParser::parseOptionalOperand(), and success().
|
static |
Definition at line 45 of file LLVMCallOps.cpp.
References mlir::OpAsmPrinter::printOperands(), and mlir::AsmPrinter::printString().
|
static |
Definition at line 28 of file LLVMCallOps.cpp.
References mlir::Attribute::getContext(), mlir::NamedAttribute::getName(), and mlir::NamedAttribute::getValue().
|
static |
|
static |
Verify that an inlinable callsite of a debug-info-bearing function in a debug-info-bearing function has a debug location attached to it.
This mirrors an LLVM IR verifier.
Definition at line 362 of file LLVMCallOps.cpp.
References mlir::LocationAttr::findInstanceOf(), mlir::Operation::getLoc(), and success().
Referenced by verifyCallOpSymbolUses().
|
static |
Definition at line 437 of file LLVMCallOps.cpp.
References mlir::FlatSymbolRefAttr::getAttr(), mlir::FlatSymbolRefAttr::getValue(), mlir::SymbolTableCollection::lookupNearestSymbolFrom(), success(), verifyCallOpDebugInfo(), mlir::call_interface_impl::verifyCallOpInterface(), and verifyCallOpVarCalleeType().
|
static |
Verify that the parameter and return types of the variadic callee type match the callOp argument and result types.
Definition at line 387 of file LLVMCallOps.cpp.
References getOperandsPassedToCallee(), and success().
Referenced by verifyCallOpSymbolUses().