|
clang 24.0.0git
|
#include "CGOpenMPRuntimeGPU.h"#include "CGDebugInfo.h"#include "CodeGenFunction.h"#include "TargetInfo.h"#include "clang/AST/Attr.h"#include "clang/AST/DeclOpenMP.h"#include "clang/AST/OpenMPClause.h"#include "clang/AST/StmtOpenMP.h"#include "clang/AST/StmtVisitor.h"#include "llvm/ADT/SmallPtrSet.h"#include "llvm/Frontend/OpenMP/OMPDeviceConstants.h"#include "llvm/Frontend/OpenMP/OMPGridValues.h"#include "llvm/IR/IRBuilder.h"#include "llvm/IR/Instructions.h"#include "llvm/TargetParser/NVPTXTargetParser.h"Go to the source code of this file.
Functions | |
| static bool | hasNestedSPMDDirective (ASTContext &Ctx, const OMPExecutableDirective &D) |
| Check for inner (nested) SPMD construct, if any. | |
| static bool | supportsSPMDExecutionMode (ASTContext &Ctx, const OMPExecutableDirective &D) |
| static void | getDistributeLastprivateVars (ASTContext &Ctx, const OMPExecutableDirective &D, llvm::SmallVectorImpl< const ValueDecl * > &Vars) |
| Get list of lastprivate variables from the teams distribute ... or teams {distribute ...} directives. | |
| static void | getTeamsReductionVars (ASTContext &Ctx, const OMPExecutableDirective &D, llvm::SmallVectorImpl< const ValueDecl * > &Vars) |
| Get list of reduction variables from the teams ... directives. | |
| static llvm::Value * | castValueToType (CodeGenFunction &CGF, llvm::Value *Val, QualType ValTy, QualType CastTy, SourceLocation Loc) |
| Cast value to the specified type. | |
| static std::optional< BinaryOperatorKind > | getReductionBinOpKind (const Expr *ReductionOp) |
| Extracts the built-in reduction operator from a combiner of the form x = x
/ <op> rhs (or the min/max conditional), or nullopt if the shape is not recognized (e.g. | |
| static std::optional< llvm::AtomicRMWInst::BinOp > | getReductionAtomicRMWOp (BinaryOperatorKind BOK, QualType Ty) |
| Maps a built-in reduction operator to an atomicrmw opcode for the atomic cross-team reduction fast path, or nullopt if there is no direct atomicrmw (e.g. | |
|
static |
Cast value to the specified type.
Definition at line 1427 of file CGOpenMPRuntimeGPU.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::ConvertTypeForMem(), clang::CodeGen::CodeGenFunction::CreateMemTempWithoutCast(), clang::CodeGen::CodeGenFunction::EmitLoadOfScalar(), clang::CodeGen::CodeGenFunction::EmitStoreOfScalar(), clang::CodeGen::CodeGenFunction::getContext(), clang::ASTContext::getTypeSizeInChars(), clang::Type::hasSignedIntegerRepresentation(), clang::Type::isIntegerType(), clang::CharUnits::isZero(), clang::CodeGen::Type, and clang::CodeGen::Address::withElementType().
|
static |
Get list of lastprivate variables from the teams distribute ... or teams {distribute ...} directives.
Definition at line 969 of file CGOpenMPRuntimeGPU.cpp.
References clang::C, getPrivateItem(), clang::CodeGen::CGOpenMPRuntime::getSingleCompoundChild(), clang::isOpenMPDistributeDirective(), and clang::isOpenMPTeamsDirective().
Referenced by clang::CodeGen::CGOpenMPRuntimeGPU::emitTeamsOutlinedFunction().
|
static |
Maps a built-in reduction operator to an atomicrmw opcode for the atomic cross-team reduction fast path, or nullopt if there is no direct atomicrmw (e.g.
user-defined, complex, fp min/max) so the buffer path is used instead.
Definition at line 1476 of file CGOpenMPRuntimeGPU.cpp.
References clang::Type::hasSignedIntegerRepresentation(), clang::Type::isFloatingType(), and clang::Type::isIntegerType().
Referenced by clang::CodeGen::CGOpenMPRuntimeGPU::emitReduction().
|
static |
Extracts the built-in reduction operator from a combiner of the form x = x / <op> rhs (or the min/max conditional), or nullopt if the shape is not recognized (e.g.
user-defined reductions).
Definition at line 1457 of file CGOpenMPRuntimeGPU.cpp.
References clang::Expr::IgnoreParenImpCasts().
Referenced by clang::CodeGen::CGOpenMPRuntimeGPU::emitReduction().
|
static |
Get list of reduction variables from the teams ... directives.
Definition at line 994 of file CGOpenMPRuntimeGPU.cpp.
References clang::C, getPrivateItem(), and clang::isOpenMPTeamsDirective().
Referenced by clang::CodeGen::CGOpenMPRuntimeGPU::emitTeamsOutlinedFunction().
|
static |
Check for inner (nested) SPMD construct, if any.
Definition at line 518 of file CGOpenMPRuntimeGPU.cpp.
References clang::CodeGen::CGOpenMPRuntime::getSingleCompoundChild(), and clang::isOpenMPParallelDirective().
Referenced by supportsSPMDExecutionMode().
|
static |
Definition at line 621 of file CGOpenMPRuntimeGPU.cpp.
References hasNestedSPMDDirective().