|
clang 23.0.0git
|
#include "CIRGenCall.h"#include "CIRGenCXXABI.h"#include "CIRGenFunction.h"#include "CIRGenFunctionInfo.h"#include "mlir/Dialect/LLVMIR/LLVMDialect.h"#include "clang/CIR/ABIArgInfo.h"#include "clang/CIR/MissingFeatures.h"#include "llvm/Support/TypeSize.h"Go to the source code of this file.
Functions | |
| static void | addAttributesFromFunctionProtoType (CIRGenBuilderTy &builder, mlir::NamedAttrList &attrs, const FunctionProtoType *fpt) |
| static void | addNoBuiltinAttributes (mlir::MLIRContext &ctx, mlir::NamedAttrList &attrs, const LangOptions &langOpts, const NoBuiltinAttr *nba=nullptr) |
| static void | addDenormalModeAttrs (llvm::DenormalMode fpDenormalMode, llvm::DenormalMode fp32DenormalMode, mlir::NamedAttrList &attrs) |
| Add denormal-fp-math and denormal-fp-math-f32 as appropriate for the requested denormal behavior, accounting for the overriding behavior of the -f32 case. | |
| static void | addMergeableDefaultFunctionAttributes (const CodeGenOptions &codeGenOpts, mlir::NamedAttrList &attrs) |
| Add default attributes to a function, which have merge semantics under -mlink-builtin-bitcode and should not simply overwrite any existing attributes in the linked library. | |
| static llvm::StringLiteral | getZeroCallUsedRegsKindStr (llvm::ZeroCallUsedRegs::ZeroCallUsedRegsKind k) |
| static void | addTrivialDefaultFunctionAttributes (mlir::MLIRContext *mlirCtx, StringRef name, bool hasOptNoneAttr, const CodeGenOptions &codeGenOpts, const LangOptions &langOpts, bool attrOnCallSite, mlir::NamedAttrList &attrs) |
| Add default attributes to a function, which have merge semantics under -mlink-builtin-bitcode and should not simply overwrite any existing attributes in the linked library. | |
| static bool | determineNoUndef (QualType clangTy, CIRGenTypes &types, const cir::CIRDataLayout &layout, const cir::ABIArgInfo &argInfo) |
| static CanQual< FunctionProtoType > | getFormalType (const CXXMethodDecl *md) |
| Returns the canonical formal type of the given C++ method. | |
| static void | appendParameterTypes (const CIRGenTypes &cgt, SmallVectorImpl< CanQualType > &prefix, CanQual< FunctionProtoType > fpt) |
| Adds the formal parameters in FPT to the given prefix. | |
| static const CIRGenFunctionInfo & | arrangeCIRFunctionInfo (CIRGenTypes &cgt, bool instanceMethod, SmallVectorImpl< CanQualType > &prefix, CanQual< FunctionProtoType > fpt) |
| Arrange the CIR function layout for a value of the given function type, on top of any implicit parameters already stored. | |
| static const CIRGenFunctionInfo & | arrangeFreeFunctionLikeCall (CIRGenTypes &cgt, CIRGenModule &cgm, const CallArgList &args, const FunctionType *fnType) |
| static cir::CIRCallOpInterface | emitCallLikeOp (CIRGenFunction &cgf, mlir::Location callLoc, cir::FuncType indirectFuncTy, mlir::Value indirectFuncVal, cir::FuncOp directFuncOp, const SmallVectorImpl< mlir::Value > &cirCallArgs, bool isInvoke, const mlir::NamedAttrList &attrs, llvm::ArrayRef< mlir::NamedAttrList > argAttrs, const mlir::NamedAttrList &retAttrs) |
|
static |
Definition at line 105 of file CIRGenCall.cpp.
References clang::FunctionProtoType::getExceptionSpecType(), clang::FunctionProtoType::isNothrow(), and clang::isUnresolvedExceptionSpec().
Referenced by clang::CIRGen::CIRGenModule::constructAttributeList().
|
static |
Add denormal-fp-math and denormal-fp-math-f32 as appropriate for the requested denormal behavior, accounting for the overriding behavior of the -f32 case.
Definition at line 154 of file CIRGenCall.cpp.
Referenced by addMergableDefaultFunctionAttributes(), and addMergeableDefaultFunctionAttributes().
|
static |
Add default attributes to a function, which have merge semantics under -mlink-builtin-bitcode and should not simply overwrite any existing attributes in the linked library.
Definition at line 167 of file CIRGenCall.cpp.
References addDenormalModeAttrs(), clang::CodeGenOptions::FP32DenormalMode, and clang::CodeGenOptions::FPDenormalMode.
Referenced by clang::CIRGen::CIRGenModule::addDefaultFunctionAttributes().
|
static |
Definition at line 117 of file CIRGenCall.cpp.
References clang::LangOptions::NoBuiltinFuncs.
Referenced by clang::CodeGen::CodeGenModule::ConstructAttributeList(), and clang::CIRGen::CIRGenModule::constructAttributeList().
|
static |
Add default attributes to a function, which have merge semantics under -mlink-builtin-bitcode and should not simply overwrite any existing attributes in the linked library.
Definition at line 202 of file CIRGenCall.cpp.
References clang::LangOptions::assumeFunctionsAreConvergent(), clang::CodeGenOptions::DefaultFunctionAttrs, getZeroCallUsedRegsKindStr(), clang::LangOptions::isNoBuiltinFunc(), and clang::CodeGenOptions::TrapFuncName.
Referenced by clang::CIRGen::CIRGenModule::addDefaultFunctionAttributes().
|
static |
Adds the formal parameters in FPT to the given prefix.
If any parameter in FPT has pass_object_size_attrs, then we'll add parameters for those, too. TODO(cir): this should be shared with LLVM codegen
Definition at line 722 of file CIRGenCall.cpp.
References clang::CIRGen::CIRGenModule::errorNYI(), clang::CIRGen::CIRGenTypes::getCGModule(), and cir::MissingFeatures::opCallExtParameterInfo().
Referenced by arrangeCIRFunctionInfo(), clang::CIRGen::CIRGenTypes::arrangeCXXStructorDeclaration(), clang::CodeGen::CodeGenTypes::arrangeCXXStructorDeclaration(), and arrangeLLVMFunctionInfo().
|
static |
Arrange the CIR function layout for a value of the given function type, on top of any implicit parameters already stored.
Definition at line 807 of file CIRGenCall.cpp.
References appendParameterTypes(), clang::CIRGen::CIRGenTypes::arrangeCIRFunctionInfo(), clang::CIRGen::RequiredArgs::getFromProtoWithExtraSlots(), clang::CanQual< T >::getUnqualifiedType(), cir::MissingFeatures::opCallExtParameterInfo(), and cir::MissingFeatures::opCallFnInfoOpts().
|
static |
Definition at line 861 of file CIRGenCall.cpp.
References clang::CIRGen::RequiredArgs::All, clang::CIRGen::CIRGenTypes::arrangeCIRFunctionInfo(), clang::cast(), clang::CIRGen::CIRGenModule::errorNYI(), clang::CIRGen::CIRGenTypes::getASTContext(), clang::ASTContext::getCanonicalParamType(), clang::Type::getCanonicalTypeUnqualified(), clang::FunctionType::getExtInfo(), clang::CIRGen::RequiredArgs::getFromProtoWithExtraSlots(), clang::FunctionType::getReturnType(), clang::CIRGen::CIRGenModule::getTargetCIRGenInfo(), clang::CIRGen::TargetCIRGenInfo::isNoProtoCallVariadic(), and cir::MissingFeatures::opCallFnInfoOpts().
Referenced by clang::CodeGen::CodeGenTypes::arrangeBlockFunctionCall(), clang::CIRGen::CIRGenTypes::arrangeFreeFunctionCall(), and clang::CodeGen::CodeGenTypes::arrangeFreeFunctionCall().
|
static |
Definition at line 539 of file CIRGenCall.cpp.
References cir::MissingFeatures::abiArgInfo(), Complex, clang::CIRGen::CIRGenTypes::convertTypeForMem(), determineNoUndef(), clang::Type::isBitIntType(), cir::ABIArgInfo::isExtend(), cir::ABIArgInfo::isIndirect(), cir::ABIArgInfo::isIndirectAliased(), clang::Type::isMemberPointerType(), cir::ABIArgInfo::isNoExt(), clang::Type::isNullPtrType(), clang::Type::isReferenceType(), clang::Type::isScalarType(), cir::isSized(), cir::MissingFeatures::opCallCallConv(), cir::CIRDataLayout::typeSizeEqualsStoreSize(), and clang::Vector.
Referenced by determineNoUndef().
|
static |
Definition at line 1044 of file CIRGenCall.cpp.
References cir::CIRBaseBuilderTy::createCallOp(), cir::CIRBaseBuilderTy::createIndirectCallOp(), clang::CIRGen::CIRGenFunction::getBuilder(), cir::MissingFeatures::opCallCallConv(), and cir::MissingFeatures::opCallSurroundingTry().
Referenced by clang::CIRGen::CIRGenFunction::emitCall().
|
static |
Returns the canonical formal type of the given C++ method.
Definition at line 713 of file CIRGenCall.cpp.
References clang::CanQual< T >::getAs(), clang::Type::getCanonicalTypeUnqualified(), and clang::ValueDecl::getType().
Referenced by clang::CIRGen::CIRGenTypes::arrangeCXXConstructorCall(), and clang::CIRGen::CIRGenTypes::arrangeCXXStructorDeclaration().
|
static |
Definition at line 174 of file CIRGenCall.cpp.
Referenced by addTrivialDefaultFunctionAttributes().