|
clang 24.0.0git
|
#include "CIRGenCall.h"#include "CIRGenFunction.h"#include "CIRGenModule.h"#include "CIRGenValue.h"#include "mlir/IR/BuiltinAttributes.h"#include "mlir/IR/Value.h"#include "mlir/Support/LLVM.h"#include "clang/AST/DeclBase.h"#include "clang/AST/Expr.h"#include "clang/AST/GlobalDecl.h"#include "clang/Basic/Builtins.h"#include "clang/Basic/DiagnosticFrontend.h"#include "clang/Basic/OperatorKinds.h"#include "clang/CIR/Dialect/IR/CIRTypes.h"#include "clang/CIR/MissingFeatures.h"#include "clang/CodeGenUtils/FunctionUtils.h"#include "llvm/ADT/STLExtras.h"#include "llvm/IR/Intrinsics.h"#include "llvm/Support/ErrorHandling.h"Go to the source code of this file.
Functions | |
| static bool | shouldEmitBuiltinAsIR (unsigned builtinID, const Builtin::Context &bi, const CIRGenFunction &cgf) |
| static RValue | emitLibraryCall (CIRGenFunction &cgf, const FunctionDecl *fd, const CallExpr *e, mlir::Operation *calleeValue) |
| template<typename Op, typename... Args> | |
| static mlir::Value | createBuiltinBitOp (CIRGenFunction &cgf, const CallExpr *e, mlir::Value arg, Args... args) |
| template<typename Op, typename... Args> | |
| static RValue | emitBuiltinBitOp (CIRGenFunction &cgf, const CallExpr *e, Args... args) |
| template<typename Op> | |
| static RValue | emitBuiltinVectorReduction (CIRGenFunction &cgf, const CallExpr *e) |
| template<typename Op> | |
| static RValue | emitBuiltinBitOpWithFallback (CIRGenFunction &cgf, const CallExpr *e) |
| Emit a clz/ctz bit op with optional fallback for __builtin_c[lt]zg. | |
| static bool | isStdcBitOpWidthSupported (cir::IntType intTy) |
| static RValue | errorStdcBitOpWidthNYI (CIRGenFunction &cgf, const CallExpr *e) |
| template<typename Op, typename... Args> | |
| static RValue | emitStdcFirstBit (CIRGenFunction &cgf, const CallExpr *e, bool invertArg, Args... args) |
| static RValue | emitStdcBitCeil (CIRGenFunction &cgf, const CallExpr *e) |
| template<typename Op, typename... Args> | |
| static RValue | emitStdcCountOp (CIRGenFunction &cgf, const CallExpr *e, bool invertArg, Args... args) |
| template<typename Op, typename... Args> | |
| static RValue | emitStdcBitWidthMinus (CIRGenFunction &cgf, const CallExpr *e, Args... args) |
| static RValue | emitStdcHasSingleBit (CIRGenFunction &cgf, const CallExpr *e) |
| static RValue | emitStdcBitFloor (CIRGenFunction &cgf, const CallExpr *e) |
| static mlir::Value | emitToInt (CIRGenFunction &cgf, mlir::Value v, QualType t, cir::IntType intType) |
| Emit the conversions required to turn the given value into an integer of the given size. | |
| static mlir::Value | emitFromInt (CIRGenFunction &cgf, mlir::Value v, QualType t, mlir::Type resultType) |
| static mlir::Value | emitSignBit (mlir::Location loc, CIRGenFunction &cgf, mlir::Value val) |
| static Address | checkAtomicAlignment (CIRGenFunction &cgf, const CallExpr *e) |
| static RValue | emitBinaryAtomic (CIRGenFunction &cgf, cir::AtomicFetchKind atomicOpkind, const CallExpr *e) |
| template<typename BinOp> | |
| static RValue | emitBinaryAtomicPost (CIRGenFunction &cgf, cir::AtomicFetchKind atomicOpkind, const CallExpr *e, bool invert=false) |
| static RValue | emitAtomicXchg (CIRGenFunction &cgf, const CallExpr *e, cir::MemOrder ordering) |
| Emit a cir.atomic.xchg for __sync_swap_N and __sync_lock_test_and_set_N. | |
| static void | emitAtomicLockRelease (CIRGenFunction &cgf, const CallExpr *e) |
| Emit a release store of 0 for __sync_lock_release_N. | |
| static void | emitAtomicFenceOp (CIRGenFunction &cgf, const CallExpr *expr, cir::SyncScopeKind syncScope) |
| static RValue | emitAtomicIsLockFree (CIRGenFunction &cgf, const CallExpr *e, unsigned builtinID) |
| static WidthAndSignedness | getIntegerWidthAndSignedness (const clang::ASTContext &astContext, const clang::QualType type) |
| template<typename OpTy> | |
| static std::pair< mlir::Value, mlir::Value > | emitOverflowOp (CIRGenBuilderTy &builder, mlir::Location loc, mlir::Type resultTy, mlir::Value lhs, mlir::Value rhs) |
| Create a checked overflow arithmetic op and return its result and overflow flag. | |
| static struct WidthAndSignedness | EncompassingIntegerType (ArrayRef< struct WidthAndSignedness > types) |
| template<class Operation> | |
| static RValue | emitUnaryMaybeConstrainedFPBuiltin (CIRGenFunction &cgf, const CallExpr &e) |
| template<class Operation> | |
| static RValue | emitUnaryFPBuiltin (CIRGenFunction &cgf, const CallExpr &e) |
| template<typename Op> | |
| static RValue | emitUnaryMaybeConstrainedFPToIntBuiltin (CIRGenFunction &cgf, const CallExpr &e) |
| template<typename Op> | |
| static RValue | emitBinaryFPBuiltin (CIRGenFunction &cgf, const CallExpr &e) |
| template<typename Op> | |
| static RValue | emitTernarySameTypeBuiltin (CIRGenFunction &cgf, const CallExpr &e) |
| template<typename Op> | |
| static RValue | emitTernaryMaybeConstrainedFPBuiltin (CIRGenFunction &cgf, const CallExpr &e) |
| template<typename Op> | |
| static mlir::Value | emitBinaryMaybeConstrainedFPBuiltin (CIRGenFunction &cgf, const CallExpr &e) |
| static RValue | errorBuiltinNYI (CIRGenFunction &cgf, const CallExpr *e, unsigned builtinID) |
| static RValue | emitBuiltinAlloca (CIRGenFunction &cgf, const CallExpr *e, unsigned builtinID) |
| static bool | shouldCIREmitFPMathIntrinsic (CIRGenFunction &cgf, const CallExpr *e, unsigned builtinID) |
| static RValue | tryEmitFPMathIntrinsic (CIRGenFunction &cgf, const CallExpr *e, unsigned builtinID) |
| static mlir::Type | decodeFixedType (CIRGenFunction &cgf, ArrayRef< llvm::Intrinsic::IITDescriptor > &infos, ArrayRef< mlir::Type > overloadTys, mlir::MLIRContext *context) |
| static mlir::Type | correctIntegerSignedness (mlir::Type iitType, QualType astType, mlir::MLIRContext *context) |
| Helper function to correct integer signedness for intrinsic arguments and return type. | |
| static mlir::Type | correctReturnType (mlir::Type iitType, const FunctionDecl *funcDecl, mlir::MLIRContext *context) |
| Helper function to correct the return type for intrinsic calls. | |
| static mlir::Value | getCorrectedPtr (mlir::Value argValue, mlir::Type expectedTy, CIRGenBuilderTy &builder) |
| static std::optional< mlir::Value > | emitTargetArchBuiltinExpr (CIRGenFunction *cgf, unsigned builtinID, const CallExpr *e, ReturnValueSlot &returnValue, llvm::Triple::ArchType arch) |
|
static |
Definition at line 305 of file CIRGenBuiltin.cpp.
References bytes(), clang::CIRGen::CIRGenFunction::cgm, clang::CIRGen::CIRGenFunction::emitPointerWithAlignment(), clang::CharUnits::fromQuantity(), clang::CIRGen::Address::getAlignment(), clang::CallExpr::getArg(), clang::CIRGen::CIRGenModule::getASTContext(), clang::CallExpr::getBeginLoc(), clang::ASTContext::getCharWidth(), clang::CIRGen::CIRGenFunction::getContext(), clang::CIRGen::CIRGenModule::getDataLayout(), clang::CIRGen::CIRGenModule::getDiags(), clang::CIRGen::Address::getElementType(), clang::CharUnits::getQuantity(), cir::CIRDataLayout::getTypeSizeInBits(), clang::ASTContext::getTypeSizeInChars(), clang::DiagnosticsEngine::Report(), clang::ASTContext::VoidPtrTy, and clang::CIRGen::Address::withAlignment().
Referenced by clang::CIRGen::CIRGenFunction::emitAtomicCmpXchg(), emitAtomicLockRelease(), emitAtomicXchg(), and clang::CIRGen::CIRGenFunction::makeBinaryAtomicValue().
|
static |
Helper function to correct integer signedness for intrinsic arguments and return type.
IIT always returns signed integers, but the actual intrinsic may expect unsigned integers based on the AST FunctionDecl parameter types.
Definition at line 1193 of file CIRGenBuiltin.cpp.
References clang::Type::isUnsignedIntegerType().
Referenced by correctReturnType(), and clang::CIRGen::CIRGenFunction::emitBuiltinExpr().
|
static |
Helper function to correct the return type for intrinsic calls.
This is needed because the AST FunctionDecl may have a different return type than the intrinsic's IIT descriptor. For example, builtins may need their signedness corrected, or a builtin may return a bool while the intrinsic returns an i1.
Definition at line 1210 of file CIRGenBuiltin.cpp.
References correctIntegerSignedness(), clang::FunctionDecl::getReturnType(), and clang::Type::isBooleanType().
Referenced by clang::CIRGen::CIRGenFunction::emitBuiltinExpr().
|
static |
Definition at line 69 of file CIRGenBuiltin.cpp.
References clang::CIRGen::CIRGenFunction::convertType(), cir::CIRBaseBuilderTy::createIntCast(), clang::CIRGen::CIRGenFunction::getBuilder(), clang::CIRGen::CIRGenFunction::getLoc(), clang::Stmt::getSourceRange(), and clang::Expr::getType().
Referenced by emitBuiltinBitOp(), emitBuiltinBitOpWithFallback(), and clang::CIRGen::CIRGenFunction::emitBuiltinExpr().
|
static |
Definition at line 1141 of file CIRGenBuiltin.cpp.
References clang::CIRGen::CIRGenFunction::cgm, decodeFixedType(), and clang::CIRGen::CIRGenModule::errorNYI().
Referenced by decodeFixedType(), and clang::CIRGen::CIRGenFunction::getIntrinsicType().
|
static |
Definition at line 461 of file CIRGenBuiltin.cpp.
References clang::CIRGen::CIRGenFunction::emitAtomicExprWithMemOrder(), clang::ast_matchers::expr, clang::CIRGen::CIRGenFunction::getBuilder(), clang::CIRGen::CIRGenFunction::getLoc(), and clang::CIRGen::CIRGenFunction::getMLIRContext().
Referenced by clang::CIRGen::CIRGenFunction::emitBuiltinExpr().
|
static |
Definition at line 480 of file CIRGenBuiltin.cpp.
References clang::CIRGen::CIRGenFunction::cgm, clang::CIRGen::CIRGenFunction::convertType(), cir::CIRBaseBuilderTy::createBitcast(), cir::CIRBaseBuilderTy::createCallOp(), clang::CIRGen::CIRGenModule::createRuntimeFunction(), clang::CIRGen::CIRGenFunction::emitScalarExpr(), clang::CIRGen::RValue::get(), clang::CallExpr::getArg(), cir::CIRBaseBuilderTy::getBoolTy(), clang::CIRGen::CIRGenFunction::getBuilder(), clang::CIRGen::CIRGenFunction::getContext(), clang::Expr::getExprLoc(), clang::CIRGen::CIRGenFunction::getLoc(), cir::CIRBaseBuilderTy::getNullPtr(), clang::ASTContext::getSizeType(), cir::CIRBaseBuilderTy::getVoidPtrTy(), and cir::MissingFeatures::opFuncCallingConv().
Referenced by clang::CIRGen::CIRGenFunction::emitBuiltinExpr().
|
static |
Emit a release store of 0 for __sync_lock_release_N.
Definition at line 446 of file CIRGenBuiltin.cpp.
References checkAtomicAlignment(), clang::CIRGen::CIRGenBuilderTy::createStore(), clang::CIRGen::CIRGenFunction::getBuilder(), cir::CIRBaseBuilderTy::getConstant(), clang::CIRGen::Address::getElementType(), clang::CIRGen::CIRGenFunction::getLoc(), clang::CIRGen::CIRGenFunction::getMLIRContext(), clang::Stmt::getSourceRange(), and cir::CIRBaseBuilderTy::getZeroInitAttr().
Referenced by clang::CIRGen::CIRGenFunction::emitBuiltinExpr().
|
static |
Emit a cir.atomic.xchg for __sync_swap_N and __sync_lock_test_and_set_N.
Definition at line 432 of file CIRGenBuiltin.cpp.
References checkAtomicAlignment(), clang::CIRGen::Address::emitRawPointer(), clang::CIRGen::CIRGenFunction::emitScalarExpr(), clang::CIRGen::RValue::get(), clang::CallExpr::getArg(), clang::CIRGen::CIRGenFunction::getBuilder(), clang::CIRGen::CIRGenFunction::getLoc(), and clang::Stmt::getSourceRange().
Referenced by clang::CIRGen::CIRGenFunction::emitBuiltinExpr().
|
static |
Definition at line 385 of file CIRGenBuiltin.cpp.
References clang::CIRGen::RValue::get(), and clang::CIRGen::CIRGenFunction::makeBinaryAtomicValue().
Referenced by clang::CIRGen::CIRGenFunction::emitBuiltinExpr().
|
static |
Definition at line 392 of file CIRGenBuiltin.cpp.
References cir::CIRBaseBuilderTy::createNot(), emitFromInt(), clang::CIRGen::RValue::get(), clang::CIRGen::CIRGenFunction::getBuilder(), clang::Expr::getType(), and clang::CIRGen::CIRGenFunction::makeBinaryAtomicValue().
Referenced by clang::CIRGen::CIRGenFunction::emitBuiltinExpr().
|
static |
Definition at line 597 of file CIRGenBuiltin.cpp.
References clang::CIRGen::CIRGenFunction::emitScalarExpr(), clang::CIRGen::RValue::get(), clang::CallExpr::getArg(), clang::CIRGen::CIRGenFunction::getBuilder(), clang::Expr::getExprLoc(), and clang::CIRGen::CIRGenFunction::getLoc().
Referenced by tryEmitFPMathIntrinsic().
|
static |
Definition at line 639 of file CIRGenBuiltin.cpp.
References clang::CIRGen::CIRGenFunction::emitScalarExpr(), clang::CallExpr::getArg(), clang::CIRGen::CIRGenFunction::getBuilder(), cir::CIRBaseBuilderTy::getConstrainedFPAttr(), clang::Expr::getExprLoc(), and clang::CIRGen::CIRGenFunction::getLoc().
Referenced by clang::CodeGen::CodeGenFunction::EmitBuiltinExpr(), clang::CIRGen::CIRGenFunction::emitBuiltinExpr(), and tryEmitFPMathIntrinsic().
|
static |
Definition at line 669 of file CIRGenBuiltin.cpp.
References clang::CIRGen::CIRGenFunction::cgm, cir::CIRBaseBuilderTy::createAlloca(), cir::CIRBaseBuilderTy::createBitcast(), clang::CIRGen::CIRGenFunction::emitScalarExpr(), clang::CIRGen::CIRGenModule::errorNYI(), clang::CIRGen::RValue::get(), clang::QualType::getAddressSpace(), clang::CallExpr::getArg(), clang::CIRGen::CIRGenFunction::getBuilder(), clang::CIRGen::CIRGenTypeCache::getCIRAllocaAddressSpace(), clang::CIRGen::CIRGenFunction::getContext(), clang::CIRGen::CIRGenFunction::getLangOpts(), clang::CIRGen::CIRGenFunction::getLoc(), clang::Type::getPointeeType(), clang::Stmt::getSourceRange(), clang::TargetInfo::getSuitableAlign(), clang::ASTContext::getTargetInfo(), clang::Expr::getType(), clang::CIRGen::CIRGenBuilderTy::getUInt8PtrTy(), clang::CIRGen::CIRGenBuilderTy::getUInt8Ty(), cir::CIRBaseBuilderTy::getVoidPtrTy(), cir::isMatchingAddressSpace(), clang::LangOptionsBase::Pattern, clang::ASTContext::toCharUnitsFromBits(), clang::LangOptionsBase::Uninitialized, and clang::LangOptionsBase::Zero.
Referenced by clang::CIRGen::CIRGenFunction::emitBuiltinExpr().
|
static |
Definition at line 82 of file CIRGenBuiltin.cpp.
References createBuiltinBitOp(), clang::CIRGen::CIRGenFunction::emitScalarExpr(), clang::CIRGen::RValue::get(), and clang::CallExpr::getArg().
Referenced by emitBuiltinBitOpWithFallback(), and clang::CIRGen::CIRGenFunction::emitBuiltinExpr().
|
static |
Emit a clz/ctz bit op with optional fallback for __builtin_c[lt]zg.
When a fallback is present, the result is the fallback value if the input is zero, otherwise the bit count.
Definition at line 101 of file CIRGenBuiltin.cpp.
References cir::MissingFeatures::builtinBitCountExpr(), cir::MissingFeatures::builtinCheckKind(), createBuiltinBitOp(), cir::CIRBaseBuilderTy::createCompare(), cir::CIRBaseBuilderTy::createSelect(), emitBuiltinBitOp(), clang::CIRGen::CIRGenFunction::emitScalarExpr(), clang::CIRGen::RValue::get(), clang::CallExpr::getArg(), clang::CIRGen::CIRGenFunction::getBuilder(), clang::CIRGen::CIRGenFunction::getLoc(), cir::CIRBaseBuilderTy::getNullValue(), clang::CallExpr::getNumArgs(), clang::Stmt::getSourceRange(), clang::CIRGen::CIRGenFunction::getTarget(), and clang::TargetInfo::isCLZForZeroUndef().
Referenced by clang::CIRGen::CIRGenFunction::emitBuiltinExpr().
|
static |
Definition at line 89 of file CIRGenBuiltin.cpp.
References clang::CIRGen::CIRGenFunction::emitScalarExpr(), clang::CIRGen::RValue::get(), clang::CallExpr::getArg(), clang::CIRGen::CIRGenFunction::getBuilder(), clang::Expr::getExprLoc(), and clang::CIRGen::CIRGenFunction::getLoc().
Referenced by clang::CIRGen::CIRGenFunction::emitBuiltinExpr().
|
static |
Definition at line 287 of file CIRGenBuiltin.cpp.
References cir::CIRBaseBuilderTy::createIntToPtr(), clang::CIRGen::CIRGenFunction::emitFromMemory(), and clang::CIRGen::CIRGenFunction::getBuilder().
Referenced by emitBinaryAtomicPost().
|
static |
Definition at line 62 of file CIRGenBuiltin.cpp.
References clang::CIRGen::CIRGenFunction::emitCall(), clang::CIRGen::CIRGenCallee::forDirect(), clang::CallExpr::getCallee(), and clang::Expr::getType().
Referenced by clang::CodeGen::CodeGenFunction::EmitBuiltinExpr(), and clang::CIRGen::CIRGenFunction::emitBuiltinExpr().
|
static |
Create a checked overflow arithmetic op and return its result and overflow flag.
Definition at line 525 of file CIRGenBuiltin.cpp.
Referenced by clang::CIRGen::CIRGenFunction::emitBuiltinExpr().
|
static |
Definition at line 298 of file CIRGenBuiltin.cpp.
References cir::CIRBaseBuilderTy::createSignBit(), clang::CIRGen::CIRGenFunction::getBuilder(), and cir::MissingFeatures::isPPC_FP128Ty().
Referenced by clang::CIRGen::CIRGenFunction::emitBuiltinExpr().
|
static |
Definition at line 170 of file CIRGenBuiltin.cpp.
References ceil, cir::CIRBaseBuilderTy::createCompare(), cir::CIRBaseBuilderTy::createSelect(), cir::CIRBaseBuilderTy::createShiftLeft(), cir::CIRBaseBuilderTy::createSub(), clang::CIRGen::CIRGenFunction::emitScalarExpr(), errorStdcBitOpWidthNYI(), clang::CIRGen::RValue::get(), clang::CallExpr::getArg(), clang::CIRGen::CIRGenFunction::getBuilder(), clang::CIRGen::CIRGenBuilderTy::getConstInt(), clang::CIRGen::CIRGenFunction::getLoc(), clang::Stmt::getSourceRange(), and isStdcBitOpWidthSupported().
Referenced by clang::CIRGen::CIRGenFunction::emitBuiltinExpr().
|
static |
Definition at line 252 of file CIRGenBuiltin.cpp.
References cir::CIRBaseBuilderTy::createCompare(), cir::CIRBaseBuilderTy::createSelect(), cir::CIRBaseBuilderTy::createShiftLeft(), cir::CIRBaseBuilderTy::createSub(), clang::CIRGen::CIRGenFunction::emitScalarExpr(), errorStdcBitOpWidthNYI(), floor, clang::CIRGen::RValue::get(), clang::CallExpr::getArg(), clang::CIRGen::CIRGenFunction::getBuilder(), clang::CIRGen::CIRGenBuilderTy::getConstInt(), clang::CIRGen::CIRGenFunction::getLoc(), cir::CIRBaseBuilderTy::getNullValue(), clang::Stmt::getSourceRange(), and isStdcBitOpWidthSupported().
Referenced by clang::CIRGen::CIRGenFunction::emitBuiltinExpr().
|
static |
Definition at line 217 of file CIRGenBuiltin.cpp.
References clang::CIRGen::CIRGenFunction::convertType(), cir::CIRBaseBuilderTy::createIntCast(), cir::CIRBaseBuilderTy::createSub(), clang::CIRGen::CIRGenFunction::emitScalarExpr(), errorStdcBitOpWidthNYI(), clang::CIRGen::RValue::get(), clang::CallExpr::getArg(), clang::CIRGen::CIRGenFunction::getBuilder(), clang::CIRGen::CIRGenBuilderTy::getConstInt(), clang::CIRGen::CIRGenFunction::getLoc(), clang::Stmt::getSourceRange(), clang::Expr::getType(), and isStdcBitOpWidthSupported().
Referenced by clang::CIRGen::CIRGenFunction::emitBuiltinExpr().
|
static |
Definition at line 198 of file CIRGenBuiltin.cpp.
References clang::CIRGen::CIRGenFunction::convertType(), cir::CIRBaseBuilderTy::createIntCast(), cir::CIRBaseBuilderTy::createNot(), clang::CIRGen::CIRGenFunction::emitScalarExpr(), errorStdcBitOpWidthNYI(), clang::CIRGen::RValue::get(), clang::CallExpr::getArg(), clang::CIRGen::CIRGenFunction::getBuilder(), clang::CIRGen::CIRGenFunction::getLoc(), clang::Stmt::getSourceRange(), clang::Expr::getType(), and isStdcBitOpWidthSupported().
Referenced by clang::CIRGen::CIRGenFunction::emitBuiltinExpr().
|
static |
Definition at line 144 of file CIRGenBuiltin.cpp.
References clang::CIRGen::CIRGenFunction::convertType(), cir::CIRBaseBuilderTy::createAdd(), cir::CIRBaseBuilderTy::createCompare(), cir::CIRBaseBuilderTy::createIntCast(), cir::CIRBaseBuilderTy::createNot(), cir::CIRBaseBuilderTy::createSelect(), clang::CIRGen::CIRGenFunction::emitScalarExpr(), errorStdcBitOpWidthNYI(), clang::CIRGen::RValue::get(), clang::CallExpr::getArg(), clang::CIRGen::CIRGenFunction::getBuilder(), clang::CIRGen::CIRGenBuilderTy::getConstInt(), clang::CIRGen::CIRGenFunction::getLoc(), cir::CIRBaseBuilderTy::getNullValue(), clang::Stmt::getSourceRange(), clang::Expr::getType(), and isStdcBitOpWidthSupported().
Referenced by clang::CIRGen::CIRGenFunction::emitBuiltinExpr().
|
static |
Definition at line 237 of file CIRGenBuiltin.cpp.
References cir::CIRBaseBuilderTy::createCompare(), clang::CIRGen::CIRGenFunction::emitScalarExpr(), errorStdcBitOpWidthNYI(), clang::CIRGen::RValue::get(), clang::CallExpr::getArg(), clang::CIRGen::CIRGenFunction::getBuilder(), clang::CIRGen::CIRGenBuilderTy::getConstInt(), clang::CIRGen::CIRGenFunction::getLoc(), clang::Stmt::getSourceRange(), and isStdcBitOpWidthSupported().
Referenced by clang::CIRGen::CIRGenFunction::emitBuiltinExpr().
|
static |
Definition at line 3371 of file CIRGenBuiltin.cpp.
References clang::CIRGen::CIRGenFunction::emitAArch64BuiltinExpr(), clang::CIRGen::CIRGenFunction::emitAMDGPUBuiltinExpr(), clang::CIRGen::CIRGenFunction::emitNVPTXBuiltinExpr(), clang::CIRGen::CIRGenFunction::emitRISCVBuiltinExpr(), clang::CIRGen::CIRGenFunction::emitX86BuiltinExpr(), clang::CIRGen::CIRGenFunction::getLangOpts(), clang::CIRGen::CIRGenFunction::getTarget(), and clang::TargetInfo::getTriple().
Referenced by clang::CIRGen::CIRGenFunction::emitTargetBuiltinExpr().
|
static |
Definition at line 622 of file CIRGenBuiltin.cpp.
References clang::CIRGen::CIRGenFunction::convertType(), clang::CIRGen::CIRGenFunction::emitScalarExpr(), clang::CIRGen::RValue::get(), clang::CallExpr::getArg(), clang::CIRGen::CIRGenFunction::getBuilder(), cir::CIRBaseBuilderTy::getConstrainedFPAttr(), clang::Expr::getExprLoc(), clang::CIRGen::CIRGenFunction::getLoc(), and clang::Expr::getType().
Referenced by clang::CodeGen::CodeGenFunction::EmitBuiltinExpr(), and tryEmitFPMathIntrinsic().
|
static |
Definition at line 608 of file CIRGenBuiltin.cpp.
References clang::CIRGen::CIRGenFunction::convertType(), clang::CIRGen::CIRGenFunction::emitScalarExpr(), clang::CIRGen::RValue::get(), clang::CallExpr::getArg(), clang::CIRGen::CIRGenFunction::getBuilder(), clang::Expr::getExprLoc(), clang::CIRGen::CIRGenFunction::getLoc(), and clang::Expr::getType().
Referenced by clang::CIRGen::CIRGenFunction::emitBuiltinExpr().
|
static |
Emit the conversions required to turn the given value into an integer of the given size.
Definition at line 276 of file CIRGenBuiltin.cpp.
References cir::CIRBaseBuilderTy::createPtrToInt(), clang::CIRGen::CIRGenFunction::emitToMemory(), and clang::CIRGen::CIRGenFunction::getBuilder().
Referenced by clang::CIRGen::CIRGenFunction::makeBinaryAtomicValue().
|
static |
Definition at line 577 of file CIRGenBuiltin.cpp.
References clang::CIRGen::CIRGenFunction::emitScalarExpr(), clang::CIRGen::RValue::get(), clang::CallExpr::getArg(), and clang::CIRGen::CIRGenFunction::getBuilder().
Referenced by clang::CIRGen::CIRGenFunction::emitBuiltinExpr().
|
static |
Definition at line 565 of file CIRGenBuiltin.cpp.
References clang::CIRGen::CIRGenFunction::emitScalarExpr(), clang::CIRGen::RValue::get(), clang::CallExpr::getArg(), clang::CIRGen::CIRGenFunction::getBuilder(), and cir::CIRBaseBuilderTy::getConstrainedFPAttr().
Referenced by clang::CodeGen::CodeGenFunction::EmitBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitPPCBuiltinExpr(), and tryEmitFPMathIntrinsic().
|
static |
Definition at line 584 of file CIRGenBuiltin.cpp.
References clang::CIRGen::CIRGenFunction::convertType(), clang::CIRGen::CIRGenFunction::emitScalarExpr(), clang::CIRGen::RValue::get(), clang::CallExpr::getArg(), clang::CIRGen::CIRGenFunction::getBuilder(), cir::CIRBaseBuilderTy::getConstrainedFPAttr(), and clang::Expr::getType().
Referenced by tryEmitFPMathIntrinsic().
|
static |
Definition at line 535 of file CIRGenBuiltin.cpp.
References EncompassingIntegerType(), and clang::ast_matchers::type.
Referenced by clang::CodeGen::CodeGenFunction::EmitBuiltinExpr(), clang::CIRGen::CIRGenFunction::emitBuiltinExpr(), EncompassingIntegerType(), and EncompassingIntegerType().
|
static |
Definition at line 652 of file CIRGenBuiltin.cpp.
References clang::ASTContext::BuiltinInfo, clang::CIRGen::CIRGenFunction::cgm, clang::CIRGen::CIRGenModule::errorNYI(), clang::CIRGen::CIRGenFunction::getContext(), clang::Builtin::Context::getName(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::CIRGen::CIRGenFunction::getUndefRValue(), and clang::Builtin::Context::isLibFunction().
Referenced by clang::CIRGen::CIRGenFunction::emitBuiltinExpr(), and tryEmitFPMathIntrinsic().
|
static |
Definition at line 137 of file CIRGenBuiltin.cpp.
References clang::CIRGen::CIRGenFunction::cgm, clang::CIRGen::CIRGenModule::errorNYI(), clang::Stmt::getSourceRange(), clang::Expr::getType(), and clang::CIRGen::CIRGenFunction::getUndefRValue().
Referenced by emitStdcBitCeil(), emitStdcBitFloor(), emitStdcBitWidthMinus(), emitStdcCountOp(), emitStdcFirstBit(), and emitStdcHasSingleBit().
|
static |
Definition at line 1226 of file CIRGenBuiltin.cpp.
References cir::MissingFeatures::addressSpace(), cir::CIRBaseBuilderTy::createAddrSpaceCast(), and cir::CIRBaseBuilderTy::createBitcast().
Referenced by clang::CIRGen::CIRGenFunction::emitBuiltinExpr().
|
static |
Definition at line 511 of file CIRGenBuiltin.cpp.
References clang::ASTContext::getIntWidth(), clang::ASTContext::getTypeInfo(), clang::ast_matchers::type, and clang::TypeInfo::Width.
Referenced by clang::CodeGen::CodeGenFunction::EmitBuiltinExpr(), and clang::CIRGen::CIRGenFunction::emitBuiltinExpr().
|
static |
Definition at line 124 of file CIRGenBuiltin.cpp.
Referenced by emitStdcBitCeil(), emitStdcBitFloor(), emitStdcBitWidthMinus(), emitStdcCountOp(), emitStdcFirstBit(), and emitStdcHasSingleBit().
|
static |
Definition at line 729 of file CIRGenBuiltin.cpp.
References clang::ASTContext::BuiltinInfo, clang::CIRGen::CIRGenFunction::cgm, clang::CIRGen::CIRGenFunction::curFuncDecl, clang::CIRGen::CIRGenModule::getCodeGenOpts(), clang::CIRGen::CIRGenFunction::getContext(), clang::CallExpr::getFPFeatures(), clang::CIRGen::CIRGenFunction::getLangOpts(), clang::CIRGen::CIRGenModule::getTriple(), clang::Decl::hasAttr(), clang::CallExpr::hasStoredFPFeatures(), and clang::Builtin::Context::shouldGenerateFPMathIntrinsic().
Referenced by clang::CIRGen::CIRGenFunction::emitBuiltinExpr().
|
static |
Definition at line 38 of file CIRGenBuiltin.cpp.
References clang::CIRGen::CIRGenFunction::cgm, clang::CIRGen::CIRGenFunction::curFPFeatures, clang::LangOptionsBase::FPE_Ignore, clang::FPOptions::getExceptionMode(), clang::CIRGen::CIRGenModule::getLangOpts(), clang::CIRGen::CIRGenModule::getTargetCIRGenInfo(), and clang::CIRGen::TargetCIRGenInfo::supportsLibCall().
Referenced by clang::CodeGen::CodeGenFunction::EmitBuiltinExpr(), and clang::CIRGen::CIRGenFunction::emitBuiltinExpr().
|
static |
Definition at line 752 of file CIRGenBuiltin.cpp.
References emitBinaryFPBuiltin(), emitBinaryMaybeConstrainedFPBuiltin(), emitTernaryMaybeConstrainedFPBuiltin(), emitUnaryMaybeConstrainedFPBuiltin(), emitUnaryMaybeConstrainedFPToIntBuiltin(), errorBuiltinNYI(), cir::MissingFeatures::fastMathFlags(), clang::CIRGen::RValue::get(), and clang::CIRGen::RValue::getIgnored().
Referenced by clang::CIRGen::CIRGenFunction::emitBuiltinExpr().