|
clang 24.0.0git
|
Go to the source code of this file.
Functions | |
| static void | setAMDGPUAtomicMetadata (CIRGenFunction &cgf, mlir::Operation *op, const AtomicExpr *expr) |
| Attach the AMDGPU atomic metadata markers that the current atomic options call for. | |
| static Address | emitValToTemp (CIRGenFunction &cgf, Expr *e) |
| static bool | isFullSizeType (CIRGenModule &cgm, mlir::Type ty, uint64_t expectedSize) |
| Does a store of the given IR type modify the full expected width? | |
| static bool | shouldCastToInt (mlir::Type valueTy, bool cmpxchg) |
| Return true if. | |
| static void | emitDefaultCaseLabel (CIRGenBuilderTy &builder, mlir::Location loc) |
| static void | emitMemOrderCaseLabel (CIRGenBuilderTy &builder, mlir::Location loc, mlir::Type orderType, llvm::ArrayRef< cir::MemOrder > orders) |
| static void | emitAtomicCmpXchg (CIRGenFunction &cgf, AtomicExpr *e, bool isWeak, Address dest, Address ptr, Address val1, Address val2, Address expectedResult, uint64_t size, cir::MemOrder successOrder, cir::MemOrder failureOrder, cir::SyncScopeKind scope) |
| static void | emitAtomicCmpXchgFailureSet (CIRGenFunction &cgf, AtomicExpr *e, bool isWeak, Address dest, Address ptr, Address val1, Address val2, Address expectedResult, Expr *failureOrderExpr, uint64_t size, cir::MemOrder successOrder, cir::SyncScopeKind scope) |
| static void | emitAtomicCmpXchgFailureSetCheckWeak (CIRGenFunction &cgf, AtomicExpr *e, Expr *isWeakExpr, Address dest, Address ptr, Address val1, Address val2, Address expectedResult, Expr *failureOrderExpr, uint64_t size, cir::MemOrder successOrder, cir::SyncScopeKind scope) |
| static void | emitAtomicOp (CIRGenFunction &cgf, AtomicExpr *expr, Address dest, Address ptr, Address val1, Address val2, Address expectedResult, Expr *isWeakExpr, Expr *failureOrderExpr, int64_t size, cir::MemOrder order, cir::SyncScopeKind scope) |
| static cir::SyncScopeKind | convertSyncScopeToCIR (CIRGenFunction &cgf, clang::SyncScope scope) |
| static std::optional< cir::MemOrder > | getEffectiveAtomicMemOrder (cir::MemOrder oriOrder, bool isStore, bool isLoad, bool isFence) |
| static void | emitAtomicExprWithDynamicMemOrder (CIRGenFunction &cgf, mlir::Value order, bool isStore, bool isLoad, bool isFence, llvm::function_ref< void(cir::MemOrder)> emitAtomicOpFn) |
| static void | emitAtomicExprWithDynamicSyncScope (CIRGenFunction &cgf, const AtomicScopeModel *scopeModel, mlir::Value scope, llvm::function_ref< void(cir::SyncScopeKind)> emitAtomicOp) |
| static RValue | emitAtomicLibCall (CIRGenFunction &cgf, llvm::StringRef funcName, QualType resultType, CallArgList &args) |
| static RValue | emitLibCallForAtomicExpr (CIRGenFunction &cgf, AtomicExpr *e, Address atomicPtr, Address dest, Address val1, Address val2, uint64_t atomicTySize, QualType resultTy, const CIRGenFunction::EmittedOrderOrScope &successOrder) |
|
static |
Definition at line 988 of file CIRGenAtomic.cpp.
References clang::ClusterScope, clang::DeviceScope, clang::HIPAgent, clang::HIPCluster, clang::HIPSingleThread, clang::HIPSystem, clang::HIPWavefront, clang::HIPWorkgroup, clang::OpenCLAllSVMDevices, clang::OpenCLDevice, clang::OpenCLSubGroup, clang::OpenCLWorkGroup, clang::SingleScope, clang::SystemScope, clang::WavefrontScope, and clang::WorkgroupScope.
Referenced by clang::CIRGen::CIRGenFunction::emitAtomicExprWithSyncScope().
|
static |
Definition at line 528 of file CIRGenAtomic.cpp.
References clang::CIRGen::CIRGenFunction::cgm, clang::CIRGen::CIRGenBuilderTy::createLoad(), clang::CIRGen::CIRGenBuilderTy::createMemCpy(), cir::CIRBaseBuilderTy::createNot(), clang::CIRGen::CIRGenBuilderTy::createStore(), clang::CIRGen::CIRGenFunction::createTempAlloca(), cir::CIRBaseBuilderTy::createYield(), clang::CIRGen::CIRGenFunction::emitStoreOfScalar(), cir::MissingFeatures::generateDebugInfo(), clang::CIRGen::Address::getAlignment(), clang::CharUnits::getAsAlign(), cir::CIRBaseBuilderTy::getBoolTy(), clang::CIRGen::CIRGenFunction::getBuilder(), clang::CIRGen::CIRGenBuilderTy::getConstInt(), clang::CIRGen::CIRGenModule::getDataLayout(), clang::CIRGen::Address::getElementType(), clang::CIRGen::CIRGenFunction::getLoc(), clang::CIRGen::CIRGenFunction::getMLIRContext(), clang::CIRGen::Address::getPointer(), clang::Stmt::getSourceRange(), clang::Expr::getType(), cir::CIRDataLayout::getTypeStoreSize(), clang::AtomicExpr::isVolatile(), clang::CIRGen::CIRGenFunction::makeAddrLValue(), setAMDGPUAtomicMetadata(), uint64_t, clang::CIRGen::CIRGenTypeCache::uInt64Ty, clang::CIRGen::CIRGenTypeCache::voidTy, and clang::CIRGen::Address::withElementType().
Referenced by emitAtomicCmpXchgFailureSet(), and emitAtomicCmpXchgFailureSet().
|
static |
Definition at line 586 of file CIRGenAtomic.cpp.
References cir::CIRBaseBuilderTy::createBreak(), cir::CIRBaseBuilderTy::createYield(), emitAtomicCmpXchg(), emitMemOrderCaseLabel(), clang::CIRGen::CIRGenFunction::emitScalarExpr(), clang::Expr::EvaluateAsInt(), clang::CIRGen::CIRGenFunction::getBuilder(), clang::CIRGen::CIRGenFunction::getContext(), clang::APValue::getInt(), clang::CIRGen::CIRGenFunction::getLoc(), clang::Stmt::getSourceRange(), cir::isValidCIRAtomicOrderingCABI(), uint64_t, and clang::Expr::EvalResult::Val.
Referenced by EmitAtomicOp(), and emitAtomicOp().
|
static |
Definition at line 677 of file CIRGenAtomic.cpp.
References clang::CIRGen::CIRGenFunction::emitScalarExpr(), cir::CIRBaseBuilderTy::getBoolTy(), clang::CIRGen::CIRGenFunction::getBuilder(), clang::CIRGen::CIRGenFunction::getLoc(), clang::Stmt::getSourceRange(), and uint64_t.
Referenced by emitAtomicOp().
|
static |
Definition at line 1059 of file CIRGenAtomic.cpp.
References cir::CIRBaseBuilderTy::createYield(), and clang::CIRGen::CIRGenFunction::getBuilder().
Referenced by clang::CIRGen::CIRGenFunction::emitAtomicExprWithMemOrder().
|
static |
Definition at line 1119 of file CIRGenAtomic.cpp.
References cir::CIRBaseBuilderTy::createYield(), emitAtomicOp(), clang::CIRGen::CIRGenFunction::getBuilder(), clang::AtomicScopeModel::getFallBackValue(), and clang::AtomicScopeModel::getRuntimeValues().
Referenced by clang::CIRGen::CIRGenFunction::emitAtomicExprWithSyncScope().
|
static |
Definition at line 1204 of file CIRGenAtomic.cpp.
References clang::CIRGen::CIRGenTypes::arrangeBuiltinFunctionCall(), clang::CIRGen::CIRGenFunction::cgm, clang::CIRGen::CIRGenModule::createRuntimeFunction(), clang::CIRGen::CIRGenFunction::emitCall(), clang::CIRGen::CIRGenCallee::forDirect(), clang::CIRGen::CIRGenTypes::getFunctionType(), clang::CIRGen::CIRGenModule::getTypes(), and cir::MissingFeatures::opFuncExtraAttrs().
Referenced by emitLibCallForAtomicExpr().
|
static |
Definition at line 707 of file CIRGenAtomic.cpp.
References cir::MissingFeatures::atomicSyncScopeID(), clang::CIRGen::CIRGenFunction::cgm, clang::CIRGen::CIRGenBuilderTy::createLoad(), clang::CIRGen::CIRGenBuilderTy::createStore(), emitAtomicCmpXchgFailureSet(), emitAtomicCmpXchgFailureSetCheckWeak(), clang::CIRGen::CIRGenModule::errorNYI(), clang::Expr::EvaluateAsBooleanCondition(), clang::ast_matchers::expr, clang::CIRGen::Address::getAlignment(), cir::CIRBaseBuilderTy::getAlignmentAttr(), clang::CIRGen::CIRGenFunction::getBuilder(), clang::CIRGen::CIRGenFunction::getContext(), clang::CIRGen::CIRGenFunction::getLoc(), clang::CIRGen::Address::getPointer(), clang::CharUnits::getQuantity(), int64_t, kind, and setAMDGPUAtomicMetadata().
Referenced by emitAtomicExprWithDynamicSyncScope(), and clang::CIRGen::CIRGenFunction::emitAtomicExprWithSyncScope().
|
static |
Definition at line 504 of file CIRGenAtomic.cpp.
|
static |
Definition at line 1219 of file CIRGenAtomic.cpp.
References clang::CIRGen::CallArgList::add(), clang::ASTContext::BoolTy, clang::CIRGen::CIRGenFunction::cgm, clang::CIRGen::CIRGenFunction::convertTempToRValue(), clang::CIRGen::CIRGenFunction::convertTypeForMem(), cir::CIRBaseBuilderTy::createPtrBitcast(), emitAtomicLibCall(), clang::CIRGen::Address::emitRawPointer(), clang::CIRGen::CIRGenFunction::emitScalarExpr(), clang::CIRGen::CIRGenModule::errorNYI(), clang::CIRGen::RValue::get(), clang::CIRGen::CIRGenFunction::getBuilder(), clang::CIRGen::CIRGenBuilderTy::getConstInt(), clang::CIRGen::CIRGenFunction::getContext(), clang::Expr::getExprLoc(), clang::CIRGen::CIRGenFunction::getLoc(), clang::AtomicExpr::getOp(), clang::AtomicExpr::getOrderFail(), clang::AtomicExpr::getPtr(), clang::ASTContext::getSizeType(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::AtomicExpr::getVal1(), clang::AtomicExpr::getVal2(), clang::ASTContext::IntTy, clang::AtomicExpr::isCmpXChg(), clang::AtomicExpr::isOpenCL(), clang::Type::isVoidType(), cir::MissingFeatures::openCL(), clang::CIRGen::CIRGenTypeCache::sizeTy, uint64_t, clang::CIRGen::CIRGenFunction::EmittedOrderOrScope::value, clang::ASTContext::VoidPtrTy, clang::ASTContext::VoidTy, clang::CIRGen::CIRGenTypeCache::voidTy, and clang::CIRGen::Address::withElementType().
Referenced by clang::CIRGen::CIRGenFunction::emitAtomicExpr().
|
static |
Definition at line 514 of file CIRGenAtomic.cpp.
Referenced by emitAtomicCmpXchgFailureSet().
|
static |
Definition at line 206 of file CIRGenAtomic.cpp.
References clang::CIRGen::CIRGenFunction::createMemTemp(), clang::CIRGen::CIRGenFunction::emitAnyExprToMem(), clang::CIRGen::CIRGenFunction::getLoc(), clang::QualType::getQualifiers(), clang::Stmt::getSourceRange(), and clang::Expr::getType().
Referenced by clang::CIRGen::CIRGenFunction::emitAtomicExpr().
|
static |
Definition at line 1031 of file CIRGenAtomic.cpp.
Referenced by clang::CIRGen::CIRGenFunction::emitAtomicExprWithMemOrder().
|
static |
Does a store of the given IR type modify the full expected width?
Definition at line 215 of file CIRGenAtomic.cpp.
References clang::CIRGen::CIRGenModule::getDataLayout(), cir::CIRDataLayout::getTypeStoreSize(), and uint64_t.
|
static |
Attach the AMDGPU atomic metadata markers that the current atomic options call for.
The "no.X" metadata is emitted when the corresponding option is off, since it asserts the absence of that memory kind. The clang::atomic attribute is what turns the options on and off.
Definition at line 166 of file CIRGenAtomic.cpp.
References cir::MissingFeatures::atomicAMDGPUAvailableVisibleMMRA(), clang::CIRGen::CIRGenFunction::cgm, clang::ast_matchers::expr, clang::FineGrainedMemory, clang::CIRGen::CIRGenModule::getAtomicOpts(), clang::CIRGen::CIRGenFunction::getBuilder(), clang::AtomicOptions::getOption(), clang::CIRGen::CIRGenModule::getTriple(), clang::IgnoreDenormalMode, and clang::RemoteMemory.
Referenced by emitAtomicCmpXchg(), and emitAtomicOp().
Return true if.
| valueTy | is a type that should be casted to integer around the atomic memory operation. If |
| cmpxchg | is true, then the cast of a floating point type is made as that instruction can not have floating point operands. TODO: Allow compare-and-exchange and FP - see comment in CIRGenAtomicExpandPass.cpp. |
Definition at line 371 of file CIRGenAtomic.cpp.
References clang::isa().
Referenced by clang::CodeGen::CodeGenFunction::EmitAtomicExpr(), clang::CIRGen::CIRGenFunction::emitAtomicExpr(), clang::CodeGen::CodeGenFunction::EmitAtomicStore(), and clang::CIRGen::CIRGenFunction::emitAtomicStore().