clang 20.0.0git
Functions
CGOpenMPRuntimeGPU.cpp File Reference
#include "CGOpenMPRuntimeGPU.h"
#include "CodeGenFunction.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 "clang/Basic/Cuda.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/Frontend/OpenMP/OMPGridValues.h"
#include "llvm/Support/MathExtras.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::ValuecastValueToType (CodeGenFunction &CGF, llvm::Value *Val, QualType ValTy, QualType CastTy, SourceLocation Loc)
 Cast value to the specified type.
 
static OffloadArch getOffloadArch (CodeGenModule &CGM)
 

Function Documentation

◆ castValueToType()

static llvm::Value * castValueToType ( CodeGenFunction CGF,
llvm::Value Val,
QualType  ValTy,
QualType  CastTy,
SourceLocation  Loc 
)
static

◆ getDistributeLastprivateVars()

static void getDistributeLastprivateVars ( ASTContext Ctx,
const OMPExecutableDirective D,
llvm::SmallVectorImpl< const ValueDecl * > &  Vars 
)
static

◆ getOffloadArch()

static OffloadArch getOffloadArch ( CodeGenModule CGM)
static

◆ getTeamsReductionVars()

static void getTeamsReductionVars ( ASTContext Ctx,
const OMPExecutableDirective D,
llvm::SmallVectorImpl< const ValueDecl * > &  Vars 
)
static

Get list of reduction variables from the teams ... directives.

Definition at line 961 of file CGOpenMPRuntimeGPU.cpp.

References clang::C, D, E, getPrivateItem(), and clang::isOpenMPTeamsDirective().

Referenced by clang::CodeGen::CGOpenMPRuntimeGPU::emitTeamsOutlinedFunction().

◆ hasNestedSPMDDirective()

static bool hasNestedSPMDDirective ( ASTContext Ctx,
const OMPExecutableDirective D 
)
static

Check for inner (nested) SPMD construct, if any.

Definition at line 515 of file CGOpenMPRuntimeGPU.cpp.

References D, clang::CodeGen::CGOpenMPRuntime::getSingleCompoundChild(), and clang::isOpenMPParallelDirective().

Referenced by supportsSPMDExecutionMode().

◆ supportsSPMDExecutionMode()

static bool supportsSPMDExecutionMode ( ASTContext Ctx,
const OMPExecutableDirective D 
)
static

Definition at line 617 of file CGOpenMPRuntimeGPU.cpp.

References D, and hasNestedSPMDDirective().