|
clang 24.0.0git
|
#include "CIRGenFunction.h"#include "mlir/Dialect/LLVMIR/LLVMAttrs.h"#include "mlir/Dialect/LLVMIR/LLVMDialect.h"#include "mlir/IR/Value.h"#include "clang/Basic/TargetBuiltins.h"#include "llvm/IR/IntrinsicsAMDGPU.h"#include "llvm/Support/AMDGPUAddrSpace.h"#include "llvm/Support/ErrorHandling.h"#include "llvm/TargetParser/AtomicScope.h"Go to the source code of this file.
Functions | |
| static mlir::Value | emitAMDGPUConstantPtrIntrinsic (CIRGenFunction &cgf, mlir::Location loc, llvm::StringRef name) |
| static cir::MemOrder | decodeAtomicOrder (const Expr *arg, ASTContext &ctx) |
| Map a constant integral to memory order. | |
| static cir::SyncScopeKind | decodeAMDGPUSyncScope (const Expr *arg) |
| Map an AMDGPU sync-scope string-literal argument onto cir::SyncScopeKind. | |
| static cir::SyncScopeKind | convertAtomicScopeToCIR (llvm::AtomicScope scope) |
| static mlir::Value | emitAMDGPUAtomicRMW (CIRGenFunction &cgf, const CallExpr *expr, cir::AtomicFetchKind binOp, bool hasVolatileArg) |
| Emit one of the AMDGPU raw hardware atomic builtins as a cir.atomic.fetch. | |
| static mlir::Value | emitAMDGPUDispatchPtr (CIRGenFunction &cgf, mlir::Location loc, const CallExpr *e=nullptr) |
| static mlir::Value | emitAMDGPUImplicitArgPtr (CIRGenFunction &cgf, mlir::Location loc) |
| static mlir::Value | emitAMDGPUWorkGroupID (CIRGenFunction &cgf, mlir::Location loc, unsigned index) |
| static mlir::Value | emitAMDGPUInvariantLoad (CIRGenFunction &cgf, mlir::Location loc, mlir::Value base, mlir::Value offset, mlir::Type ty, CharUnits align) |
| static mlir::Value | emitAMDGPUGridSize (CIRGenFunction &cgf, mlir::Location loc, unsigned index) |
| static mlir::Value | emitAMDGPUWorkGroupSizeV5 (CIRGenFunction &cgf, mlir::Location loc, unsigned index) |
| static mlir::Value | emitAMDGPUWorkGroupSizeV4 (CIRGenFunction &cgf, mlir::Location loc, unsigned index) |
| static mlir::Value | emitAMDGPUWorkGroupSize (CIRGenFunction &cgf, mlir::Location loc, unsigned index) |
| static mlir::Value | emitBinaryExpMaybeConstrainedFPBuiltin (CIRGenFunction &cgf, const CallExpr *e, llvm::StringRef intrinsicName, llvm::StringRef constrainedIntrinsicName) |
| static mlir::Value | emitLogbBuiltin (CIRGenFunction &cgf, const CallExpr *e, const llvm::fltSemantics &fSem) |
| static mlir::Value | emitAMDGCNImageOverloadedReturnType (CIRGenFunction &cgf, const CallExpr *e, llvm::StringRef intrinsicName, bool isImageStore) |
|
static |
Definition at line 74 of file CIRGenBuiltinAMDGPU.cpp.
Referenced by clang::CIRGen::CIRGenFunction::emitAMDGPUBuiltinExpr().
|
static |
Map an AMDGPU sync-scope string-literal argument onto cir::SyncScopeKind.
An absent or unrecognized scope is system scope, which is the conservative choice and matches what an empty syncscope string means in LLVM.
Definition at line 61 of file CIRGenBuiltinAMDGPU.cpp.
Referenced by emitAMDGPUAtomicRMW().
|
static |
Map a constant integral to memory order.
Definition at line 39 of file CIRGenBuiltinAMDGPU.cpp.
References clang::APValue::getInt(), and clang::Expr::EvalResult::Val.
Referenced by emitAMDGPUAtomicRMW(), and clang::CIRGen::CIRGenFunction::emitAMDGPUBuiltinExpr().
|
static |
Definition at line 376 of file CIRGenBuiltinAMDGPU.cpp.
References clang::CIRGen::CIRGenFunction::convertType(), clang::CIRGen::CIRGenFunction::emitScalarExpr(), clang::CallExpr::getArg(), clang::CIRGen::CIRGenFunction::getBuilder(), clang::Expr::getExprLoc(), clang::CIRGen::CIRGenFunction::getLoc(), clang::CallExpr::getNumArgs(), and clang::Expr::getType().
Referenced by clang::CodeGen::CodeGenFunction::EmitAMDGPUBuiltinExpr(), and clang::CIRGen::CIRGenFunction::emitAMDGPUBuiltinExpr().
|
static |
Emit one of the AMDGPU raw hardware atomic builtins as a cir.atomic.fetch.
Definition at line 93 of file CIRGenBuiltinAMDGPU.cpp.
References clang::Type::castAs(), decodeAMDGPUSyncScope(), decodeAtomicOrder(), clang::CIRGen::CIRGenFunction::emitPointerWithAlignment(), clang::CIRGen::Address::emitRawPointer(), clang::CIRGen::CIRGenFunction::emitScalarExpr(), clang::ast_matchers::expr, clang::CIRGen::CIRGenFunction::getBuilder(), clang::CIRGen::CIRGenFunction::getContext(), clang::APValue::getInt(), clang::CIRGen::CIRGenFunction::getLoc(), getPointeeType(), clang::QualType::isVolatileQualified(), and clang::Expr::EvalResult::Val.
Referenced by clang::CIRGen::CIRGenFunction::emitAMDGPUBuiltinExpr().
|
static |
Definition at line 29 of file CIRGenBuiltinAMDGPU.cpp.
References clang::CIRGen::CIRGenBuilderTy::emitIntrinsicCallOp(), clang::CIRGen::CIRGenFunction::getBuilder(), and cir::CIRBaseBuilderTy::getVoidPtrTy().
Referenced by emitAMDGPUDispatchPtr(), and emitAMDGPUImplicitArgPtr().
|
static |
Definition at line 138 of file CIRGenBuiltinAMDGPU.cpp.
References clang::CIRGen::CIRGenFunction::convertType(), cir::CIRBaseBuilderTy::createAddrSpaceCast(), emitAMDGPUConstantPtrIntrinsic(), and clang::CIRGen::CIRGenFunction::getBuilder().
Referenced by clang::CIRGen::CIRGenFunction::emitAMDGPUBuiltinExpr(), emitAMDGPUGridSize(), and emitAMDGPUWorkGroupSizeV4().
|
static |
Definition at line 185 of file CIRGenBuiltinAMDGPU.cpp.
References emitAMDGPUDispatchPtr(), emitAMDGPUInvariantLoad(), clang::CharUnits::fromQuantity(), clang::CIRGen::CIRGenFunction::getBuilder(), clang::CIRGen::CIRGenBuilderTy::getUInt32Ty(), and clang::CIRGen::CIRGenBuilderTy::getUInt64().
Referenced by clang::CIRGen::CIRGenFunction::emitAMDGPUBuiltinExpr().
|
static |
Definition at line 155 of file CIRGenBuiltinAMDGPU.cpp.
References emitAMDGPUConstantPtrIntrinsic(), and cir::MissingFeatures::opCallAttrs().
Referenced by emitAMDGPUWorkGroupSizeV5().
|
static |
Definition at line 173 of file CIRGenBuiltinAMDGPU.cpp.
References clang::CIRGen::CIRGenBuilderTy::createAlignedLoad(), cir::CIRBaseBuilderTy::createPtrStride(), clang::CIRGen::CIRGenFunction::getBuilder(), and cir::MissingFeatures::opLoadRangeNoundefMetadata().
Referenced by emitAMDGPUGridSize(), emitAMDGPUWorkGroupSizeV4(), and emitAMDGPUWorkGroupSizeV5().
|
static |
Definition at line 162 of file CIRGenBuiltinAMDGPU.cpp.
References clang::CIRGen::CIRGenBuilderTy::emitIntrinsicCallOp(), clang::CIRGen::CIRGenFunction::getBuilder(), and clang::CIRGen::CIRGenBuilderTy::getUInt32Ty().
Referenced by emitAMDGPUWorkGroupSizeV4(), and emitAMDGPUWorkGroupSizeV5().
|
static |
Definition at line 264 of file CIRGenBuiltinAMDGPU.cpp.
References clang::CIRGen::CIRGenFunction::cgm, clang::TargetOptions::CodeObjectVersion, clang::CIRGen::CIRGenBuilderTy::createAlignedLoad(), cir::CIRBaseBuilderTy::createCompare(), cir::CIRBaseBuilderTy::createGetGlobal(), clang::CIRGen::CIRGenModule::createGlobalOp(), cir::CIRBaseBuilderTy::createSelect(), emitAMDGPUWorkGroupSizeV4(), emitAMDGPUWorkGroupSizeV5(), clang::CIRGen::CIRGenFunction::getBuilder(), cir::CIRBaseBuilderTy::getConstantInt(), clang::CIRGen::CIRGenFunction::getContext(), clang::CIRGen::CIRGenModule::getGlobalValue(), clang::CIRGen::CIRGenModule::getMLIRContext(), clang::CIRGen::CIRGenBuilderTy::getSInt32Ty(), clang::CIRGen::CIRGenFunction::getTarget(), clang::TargetInfo::getTargetOpts(), clang::TargetInfo::getTriple(), clang::ASTContext::getTypeAlignInChars(), clang::ASTContext::IntTy, clang::opencl_constant, and cir::toCIRAddressSpaceAttr().
Referenced by clang::CIRGen::CIRGenFunction::emitAMDGPUBuiltinExpr().
|
static |
Definition at line 230 of file CIRGenBuiltinAMDGPU.cpp.
References cir::CIRBaseBuilderTy::createCompare(), cir::CIRBaseBuilderTy::createIntCast(), cir::CIRBaseBuilderTy::createMul(), cir::CIRBaseBuilderTy::createSelect(), cir::CIRBaseBuilderTy::createSub(), emitAMDGPUDispatchPtr(), emitAMDGPUInvariantLoad(), emitAMDGPUWorkGroupID(), clang::CharUnits::fromQuantity(), clang::CIRGen::CIRGenFunction::getBuilder(), clang::CIRGen::CIRGenFunction::getLangOpts(), clang::CIRGen::CIRGenBuilderTy::getUInt16Ty(), clang::CIRGen::CIRGenBuilderTy::getUInt32Ty(), clang::CIRGen::CIRGenBuilderTy::getUInt64(), and remainder.
Referenced by emitAMDGPUWorkGroupSize().
|
static |
Definition at line 196 of file CIRGenBuiltinAMDGPU.cpp.
References cir::CIRBaseBuilderTy::createCompare(), cir::CIRBaseBuilderTy::createIntCast(), cir::CIRBaseBuilderTy::createSelect(), emitAMDGPUImplicitArgPtr(), emitAMDGPUInvariantLoad(), emitAMDGPUWorkGroupID(), clang::CharUnits::fromQuantity(), clang::CIRGen::CIRGenFunction::getBuilder(), clang::CIRGen::CIRGenFunction::getLangOpts(), clang::CIRGen::CIRGenBuilderTy::getUInt16Ty(), clang::CIRGen::CIRGenBuilderTy::getUInt32Ty(), and clang::CIRGen::CIRGenBuilderTy::getUInt64().
Referenced by emitAMDGPUWorkGroupSize().
|
static |
Definition at line 302 of file CIRGenBuiltinAMDGPU.cpp.
References clang::CIRGen::CIRGenFunction::cgm, clang::CIRGen::CIRGenBuilderTy::emitIntrinsicCallOp(), clang::CIRGen::CIRGenFunction::emitScalarExpr(), clang::CIRGen::CIRGenModule::errorNYI(), clang::CallExpr::getArg(), clang::CIRGen::CIRGenFunction::getBuilder(), clang::Expr::getExprLoc(), cir::CIRBaseBuilderTy::getIsFPConstrained(), clang::CIRGen::CIRGenFunction::getLoc(), and clang::Stmt::getSourceRange().
Referenced by clang::CodeGen::CodeGenFunction::EmitAMDGPUBuiltinExpr(), clang::CIRGen::CIRGenFunction::emitAMDGPUBuiltinExpr(), and clang::CodeGen::CodeGenFunction::EmitBuiltinExpr().
|
static |
Definition at line 322 of file CIRGenBuiltinAMDGPU.cpp.
References cir::CIRBaseBuilderTy::createCompare(), cir::CIRBaseBuilderTy::createNSWAdd(), cir::CIRBaseBuilderTy::createSelect(), clang::CIRGen::CIRGenBuilderTy::emitIntrinsicCallOp(), clang::CIRGen::CIRGenFunction::emitScalarExpr(), exp, fabs, cir::RecordType::getAllDataKinds(), clang::CIRGen::CIRGenBuilderTy::getAnonRecordTy(), clang::CallExpr::getArg(), clang::CIRGen::CIRGenFunction::getBuilder(), cir::CIRBaseBuilderTy::getConstant(), clang::Expr::getExprLoc(), clang::CIRGen::CIRGenFunction::getLoc(), and clang::CIRGen::CIRGenBuilderTy::getSInt32Ty().
Referenced by clang::CIRGen::CIRGenFunction::emitAMDGPUBuiltinExpr().