clang: lib/CodeGen/CGStmtOpenMP.cpp File Reference (original) (raw)
#include "[CGCleanup.h](CGCleanup%5F8h%5Fsource.html)"#include "[CGDebugInfo.h](CGDebugInfo%5F8h%5Fsource.html)"#include "[CGOpenMPRuntime.h](CGOpenMPRuntime%5F8h%5Fsource.html)"#include "[CodeGenFunction.h](CodeGenFunction%5F8h%5Fsource.html)"#include "[CodeGenModule.h](CodeGenModule%5F8h%5Fsource.html)"#include "[CodeGenPGO.h](CodeGenPGO%5F8h%5Fsource.html)"#include "[TargetInfo.h](lib%5F2CodeGen%5F2TargetInfo%5F8h%5Fsource.html)"#include "[clang/AST/ASTContext.h](ASTContext%5F8h%5Fsource.html)"#include "[clang/AST/Attr.h](AST%5F2Attr%5F8h%5Fsource.html)"#include "[clang/AST/DeclOpenMP.h](DeclOpenMP%5F8h%5Fsource.html)"#include "[clang/AST/OpenMPClause.h](OpenMPClause%5F8h%5Fsource.html)"#include "[clang/AST/Stmt.h](Stmt%5F8h%5Fsource.html)"#include "[clang/AST/StmtOpenMP.h](StmtOpenMP%5F8h%5Fsource.html)"#include "[clang/AST/StmtVisitor.h](StmtVisitor%5F8h%5Fsource.html)"#include "[clang/Basic/OpenMPKinds.h](OpenMPKinds%5F8h%5Fsource.html)"#include "[clang/Basic/PrettyStackTrace.h](PrettyStackTrace%5F8h%5Fsource.html)"#include "[clang/Basic/SourceManager.h](SourceManager%5F8h%5Fsource.html)"#include "llvm/ADT/SmallSet.h"#include "llvm/BinaryFormat/Dwarf.h"#include "llvm/Frontend/OpenMP/OMPConstants.h"#include "llvm/Frontend/OpenMP/OMPIRBuilder.h"#include "llvm/IR/Constants.h"#include "llvm/IR/DebugInfoMetadata.h"#include "llvm/IR/Instructions.h"#include "llvm/IR/IntrinsicInst.h"#include "llvm/IR/Metadata.h"#include "llvm/Support/AtomicOrdering.h"#include "llvm/Support/Debug.h"#include <optional>
Go to the source code of this file.
| Macros | |
|---|---|
| #define | TTL_CODEGEN_TYPE "target-teams-loop-codegen" |
◆ TTL_CODEGEN_TYPE
#define TTL_CODEGEN_TYPE "target-teams-loop-codegen"
◆ EmittedClosureTy
◆ applyConservativeSimdOrderedDirective()
| void applyConservativeSimdOrderedDirective ( const Stmt & AssociatedStmt, LoopInfoStack & LoopStack ) | static |
|---|
◆ buildDependences()
◆ castValueFromUintptr()
◆ checkForLastprivateConditionalUpdate()
Definition at line 1580 of file CGStmtOpenMP.cpp.
References clang::C, clang::cast(), clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CGOpenMPRuntime::checkAndEmitLastprivateConditional(), clang::CodeGen::CGOpenMPRuntime::checkAndEmitSharedLastprivateConditional(), clang::CodeGen::CodeGenFunction::getLangOpts(), and clang::CodeGen::CodeGenModule::getOpenMPRuntime().
Referenced by emitOMPForDirective(), clang::CodeGen::CodeGenFunction::EmitOMPForSimdDirective(), clang::CodeGen::CodeGenFunction::EmitOMPParallelDirective(), clang::CodeGen::CodeGenFunction::EmitOMPParallelForDirective(), clang::CodeGen::CodeGenFunction::EmitOMPParallelForSimdDirective(), clang::CodeGen::CodeGenFunction::EmitOMPParallelGenericLoopDirective(), clang::CodeGen::CodeGenFunction::EmitOMPParallelMaskedDirective(), clang::CodeGen::CodeGenFunction::EmitOMPParallelMasterDirective(), clang::CodeGen::CodeGenFunction::EmitOMPParallelSectionsDirective(), clang::CodeGen::CodeGenFunction::EmitOMPScopeDirective(), clang::CodeGen::CodeGenFunction::EmitOMPSectionsDirective(), emitOMPSimdDirective(), clang::CodeGen::CodeGenFunction::EmitOMPSingleDirective(), and clang::CodeGen::CodeGenFunction::EmitSimpleOMPExecutableDirective().
◆ convertClauseKindToSchedKind()
◆ convertToComplexValue()
◆ convertToScalarValue()
◆ convertToType()
◆ createImplicitFirstprivateForType()
◆ createSectionLVal()
◆ emitAlignedClause()
Definition at line 2352 of file CGStmtOpenMP.cpp.
References clang::cast(), clang::CodeGen::CodeGenFunction::emitAlignmentAssumption(), clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::CodeGen::CodeGenFunction::getContext(), clang::CodeGen::CodeGenFunction::getLLVMContext(), clang::ASTContext::getOpenMPDefaultSimdAlign(), clang::CharUnits::getQuantity(), clang::CodeGen::CodeGenFunction::HaveInsertPoint(), and clang::ASTContext::toCharUnitsFromBits().
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPDistributeLoop(), emitOMPSimdRegion(), and clang::CodeGen::CodeGenFunction::EmitOMPWorksharingLoop().
◆ emitBody()
◆ emitCapturedStmtCall()
◆ emitCapturedStmtFunc()
◆ emitCommonOMPParallelDirective()
Definition at line 1636 of file CGStmtOpenMP.cpp.
References clang::C, clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CGOpenMPRuntime::emitNumThreadsClause(), clang::CodeGen::CGOpenMPRuntime::emitParallelCall(), clang::CodeGen::CGOpenMPRuntime::emitParallelOutlinedFunction(), clang::CodeGen::CGOpenMPRuntime::emitProcBindClause(), clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::CodeGen::CodeGenFunction::GenerateOpenMPCapturedVars(), clang::CapturedStmt::getCapturedDecl(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), clang::OMPC_NUMTHREADS_unknown, and clang::CapturedDecl::param_begin().
Referenced by emitInnerParallelForWhenCombined(), clang::CodeGen::CodeGenFunction::EmitOMPParallelDirective(), clang::CodeGen::CodeGenFunction::EmitOMPParallelForDirective(), clang::CodeGen::CodeGenFunction::EmitOMPParallelForSimdDirective(), clang::CodeGen::CodeGenFunction::EmitOMPParallelGenericLoopDirective(), clang::CodeGen::CodeGenFunction::EmitOMPParallelMaskedDirective(), clang::CodeGen::CodeGenFunction::EmitOMPParallelMaskedTaskLoopDirective(), clang::CodeGen::CodeGenFunction::EmitOMPParallelMaskedTaskLoopSimdDirective(), clang::CodeGen::CodeGenFunction::EmitOMPParallelMasterDirective(), clang::CodeGen::CodeGenFunction::EmitOMPParallelMasterTaskLoopDirective(), clang::CodeGen::CodeGenFunction::EmitOMPParallelMasterTaskLoopSimdDirective(), clang::CodeGen::CodeGenFunction::EmitOMPParallelSectionsDirective(), emitTargetParallelForRegion(), emitTargetParallelForSimdRegion(), emitTargetParallelGenericLoopRegion(), and emitTargetParallelRegion().
◆ emitCommonOMPTargetDirective()
Definition at line 6943 of file CGStmtOpenMP.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::C, clang::cast(), clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenFunction::ConstantFoldsToSimpleInteger(), clang::Ctor_Complete, clang::CodeGen::CodeGenFunction::CurFuncDecl, clang::Device, clang::CodeGen::CGOpenMPRuntime::LastprivateConditionalRAII::disable(), clang::Dtor_Complete, clang::CodeGen::CGOpenMPRuntime::emitInlinedDirective(), clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::CodeGen::CodeGenFunction::EmitStmt(), clang::CodeGen::CGOpenMPRuntime::emitTargetCall(), clang::CodeGen::CGOpenMPRuntime::emitTargetOutlinedFunction(), clang::DiagnosticsEngine::Error, clang::DiagnosticsEngine::getCustomDiagID(), clang::CodeGen::CodeGenModule::getDiags(), clang::CodeGen::CodeGenModule::getLangOpts(), clang::CodeGen::CodeGenModule::getMangledName(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), clang::CodeGen::CodeGenTypeCache::Int64Ty, clang::isOpenMPTargetExecutionDirective(), clang::OMPC_DEVICE_unknown, clang::LangOptions::OMPTargetTriples, and clang::DiagnosticsEngine::Report().
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPTargetDirective(), clang::CodeGen::CodeGenFunction::EmitOMPTargetParallelDirective(), clang::CodeGen::CodeGenFunction::EmitOMPTargetParallelForDirective(), clang::CodeGen::CodeGenFunction::EmitOMPTargetParallelForSimdDirective(), clang::CodeGen::CodeGenFunction::EmitOMPTargetParallelGenericLoopDirective(), clang::CodeGen::CodeGenFunction::EmitOMPTargetSimdDirective(), clang::CodeGen::CodeGenFunction::EmitOMPTargetTeamsDirective(), clang::CodeGen::CodeGenFunction::EmitOMPTargetTeamsDistributeDirective(), clang::CodeGen::CodeGenFunction::EmitOMPTargetTeamsDistributeParallelForDirective(), clang::CodeGen::CodeGenFunction::EmitOMPTargetTeamsDistributeParallelForSimdDirective(), clang::CodeGen::CodeGenFunction::EmitOMPTargetTeamsDistributeSimdDirective(), and clang::CodeGen::CodeGenFunction::EmitOMPTargetTeamsGenericLoopDirective().
◆ emitCommonOMPTeamsDirective()
Definition at line 7066 of file CGStmtOpenMP.cpp.
References clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CGOpenMPRuntime::emitNumTeamsClause(), clang::CodeGen::CGOpenMPRuntime::emitTeamsCall(), clang::CodeGen::CGOpenMPRuntime::emitTeamsOutlinedFunction(), clang::CodeGen::CodeGenFunction::GenerateOpenMPCapturedVars(), clang::CapturedStmt::getCapturedDecl(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), and clang::CapturedDecl::param_begin().
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPTeamsDirective(), clang::CodeGen::CodeGenFunction::EmitOMPTeamsDistributeDirective(), clang::CodeGen::CodeGenFunction::EmitOMPTeamsDistributeParallelForDirective(), clang::CodeGen::CodeGenFunction::EmitOMPTeamsDistributeParallelForSimdDirective(), clang::CodeGen::CodeGenFunction::EmitOMPTeamsDistributeSimdDirective(), clang::CodeGen::CodeGenFunction::EmitOMPTeamsGenericLoopDirective(), emitTargetTeamsDistributeParallelForRegion(), emitTargetTeamsDistributeParallelForSimdRegion(), emitTargetTeamsDistributeRegion(), emitTargetTeamsDistributeSimdRegion(), emitTargetTeamsGenericLoopRegionAsDistribute(), emitTargetTeamsGenericLoopRegionAsParallel(), and emitTargetTeamsRegion().
◆ emitCommonSimdLoop()
Definition at line 2682 of file CGStmtOpenMP.cpp.
References clang::C, clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CGOpenMPRuntime::emitIfClause(), getEffectiveDirectiveKind(), clang::CodeGen::CodeGenFunction::getLangOpts(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), clang::isOpenMPSimdDirective(), clang::CodeGen::CodeGenFunction::LoopStack, and clang::CodeGen::LoopInfoStack::setVectorizeEnable().
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPDistributeLoop(), emitOMPSimdRegion(), clang::CodeGen::CodeGenFunction::EmitOMPTaskLoopBasedDirective(), and clang::CodeGen::CodeGenFunction::EmitOMPWorksharingLoop().
◆ emitDispatchForLoopBounds()
When dealing with dispatch schedules (e.g.
dynamic, guided) we do not consider the lower and upper bound expressions generated by the worksharing loop support, but we use 0 and the iteration space size as constants
Definition at line 3776 of file CGStmtOpenMP.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::cast(), clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::CodeGen::CodeGenFunction::getContext(), clang::Expr::getType(), and clang::ASTContext::getTypeSize().
Referenced by emitTargetParallelForRegion(), emitTargetParallelForSimdRegion(), emitTargetParallelGenericLoopRegion(), and emitWorksharingDirective().
◆ emitDistributeParallelForDispatchBounds()
◆ emitDistributeParallelForDistributeInnerBoundParams()
◆ emitDistributeParallelForInnerBounds()
◆ emitEmptyBoundParameters()
Definition at line 1710 of file CGStmtOpenMP.cpp.
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPParallelDirective(), clang::CodeGen::CodeGenFunction::EmitOMPParallelForDirective(), clang::CodeGen::CodeGenFunction::EmitOMPParallelForSimdDirective(), clang::CodeGen::CodeGenFunction::EmitOMPParallelGenericLoopDirective(), clang::CodeGen::CodeGenFunction::EmitOMPParallelMaskedDirective(), clang::CodeGen::CodeGenFunction::EmitOMPParallelMaskedTaskLoopDirective(), clang::CodeGen::CodeGenFunction::EmitOMPParallelMaskedTaskLoopSimdDirective(), clang::CodeGen::CodeGenFunction::EmitOMPParallelMasterDirective(), clang::CodeGen::CodeGenFunction::EmitOMPParallelMasterTaskLoopDirective(), clang::CodeGen::CodeGenFunction::EmitOMPParallelMasterTaskLoopSimdDirective(), clang::CodeGen::CodeGenFunction::EmitOMPParallelSectionsDirective(), emitTargetParallelForRegion(), emitTargetParallelForSimdRegion(), emitTargetParallelGenericLoopRegion(), and emitTargetParallelRegion().
◆ emitEmptyOrdered()
◆ emitForLoopBounds()
◆ emitInnerParallelForWhenCombined()
Definition at line 3426 of file CGStmtOpenMP.cpp.
References emitCommonOMPParallelDirective(), emitDistributeParallelForDispatchBounds(), emitDistributeParallelForDistributeInnerBoundParams(), emitDistributeParallelForInnerBounds(), clang::CodeGen::CodeGenFunction::EmitOMPWorksharingLoop(), getEffectiveDirectiveKind(), and clang::isOpenMPSimdDirective().
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPDistributeParallelForDirective(), clang::CodeGen::CodeGenFunction::EmitOMPDistributeParallelForSimdDirective(), clang::CodeGen::CodeGenFunction::EmitOMPTeamsDistributeParallelForDirective(), clang::CodeGen::CodeGenFunction::EmitOMPTeamsDistributeParallelForSimdDirective(), emitTargetTeamsDistributeParallelForRegion(), emitTargetTeamsDistributeParallelForSimdRegion(), and emitTargetTeamsGenericLoopRegionAsParallel().
◆ emitMasked()
◆ emitMaster()
◆ emitOMPAtomicCaptureExpr()
Definition at line 6640 of file CGStmtOpenMP.cpp.
References clang::cast(), clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CGOpenMPRuntime::checkAndEmitLastprivateConditional(), convertToType(), clang::CodeGen::CodeGenFunction::EmitAnyExpr(), clang::CodeGen::CGOpenMPRuntime::emitFlush(), clang::CodeGen::CodeGenFunction::EmitLValue(), clang::CodeGen::CodeGenFunction::EmitOMPAtomicSimpleUpdateExpr(), clang::CodeGen::CodeGenFunction::emitOMPSimpleStore(), clang::CodeGen::CodeGenModule::getLangOpts(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), clang::Expr::getType(), clang::Expr::IgnoreImpCasts(), clang::isa(), clang::IsPostfixUpdate, clang::IsXLHSInRHSPart, V, and X.
Referenced by emitOMPAtomicExpr().
◆ emitOMPAtomicCompareExpr()
| void emitOMPAtomicCompareExpr ( CodeGenFunction & CGF, llvm::AtomicOrdering AO, llvm::AtomicOrdering FailAO, const Expr * X, const Expr * V, const Expr * R, const Expr * E, const Expr * D, const Expr * CE, bool IsXBinopExpr, bool IsPostfixUpdate, bool IsFailOnly, SourceLocation Loc ) | static |
|---|
Definition at line 6747 of file CGStmtOpenMP.cpp.
References clang::Addr, clang::CodeGen::CodeGenFunction::Builder, clang::cast(), clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenFunction::EmitLValue(), clang::CodeGen::Address::emitRawPointer(), clang::CodeGen::CodeGenFunction::EmitScalarConversion(), clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::CodeGen::Address::getElementType(), clang::CodeGen::CGOpenMPRuntime::getOMPBuilder(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), clang::Expr::getType(), clang::Type::hasSignedIntegerRepresentation(), clang::Expr::IgnoreImplicitAsWritten(), clang::isa(), clang::IsFailOnly, clang::IsPostfixUpdate, clang::QualType::isVolatileQualified(), V, and X.
Referenced by emitOMPAtomicExpr().
◆ emitOMPAtomicExpr()
| void emitOMPAtomicExpr ( CodeGenFunction & CGF, OpenMPClauseKind Kind, llvm::AtomicOrdering AO, llvm::AtomicOrdering FailAO, bool IsPostfixUpdate, const Expr * X, const Expr * V, const Expr * R, const Expr * E, const Expr * UE, const Expr * D, const Expr * CE, bool IsXLHSInRHSPart, bool IsFailOnly, SourceLocation Loc ) | static |
|---|
◆ emitOMPAtomicReadExpr()
◆ emitOMPAtomicRMW()
Definition at line 6433 of file CGStmtOpenMP.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenFunction::emitAtomicRMWInst(), clang::CodeGen::RValue::get(), clang::CodeGen::CodeGenFunction::getContext(), clang::CodeGen::CodeGenModule::getDataLayout(), clang::isa(), clang::IsXLHSInRHSPart, clang::T, clang::Update, and X.
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPAtomicSimpleUpdateExpr().
◆ emitOMPAtomicUpdateExpr()
Definition at line 6575 of file CGStmtOpenMP.cpp.
References clang::cast(), clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CGOpenMPRuntime::checkAndEmitLastprivateConditional(), clang::CodeGen::CodeGenFunction::EmitAnyExpr(), clang::CodeGen::CGOpenMPRuntime::emitFlush(), clang::CodeGen::CodeGenFunction::EmitLValue(), clang::CodeGen::CodeGenFunction::EmitOMPAtomicSimpleUpdateExpr(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), clang::Expr::IgnoreImpCasts(), clang::isa(), clang::IsXLHSInRHSPart, and X.
Referenced by emitOMPAtomicExpr().
◆ emitOMPAtomicWriteExpr()
◆ emitOMPCopyinClause()
◆ emitOMPDistributeDirective()
◆ emitOMPForDirective()
Definition at line 4150 of file CGStmtOpenMP.cpp.
References clang::CodeGen::CodeGenFunction::AllocaInsertPt, clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, checkForLastprivateConditionalUpdate(), convertClauseKindToSchedKind(), clang::CodeGen::CGOpenMPRuntime::LastprivateConditionalRAII::disable(), clang::CodeGen::CGOpenMPRuntime::emitBarrierCall(), clang::CodeGen::CGOpenMPRuntime::emitInlinedDirective(), clang::CodeGen::CodeGenFunction::EmitOMPCollapsedCanonicalLoopNest(), clang::CodeGen::CodeGenFunction::EmitScalarExpr(), emitWorksharingDirective(), clang::CodeGen::CodeGenModule::getLangOpts(), clang::CodeGen::CGOpenMPRuntime::getOMPBuilder(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), and isForSupportedByOpenMPIRBuilder().
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPForDirective(), and clang::CodeGen::CodeGenFunction::EmitOMPGenericLoopDirective().
◆ EmitOMPHelperVar()
◆ emitOMPLoopBodyWithStopPoint()
◆ emitOMPSimdDirective()
Definition at line 2885 of file CGStmtOpenMP.cpp.
References clang::C, clang::cast(), clang::CodeGen::CodeGenFunction::CGM, checkForLastprivateConditionalUpdate(), clang::CodeGen::CGOpenMPRuntime::LastprivateConditionalRAII::disable(), clang::CodeGen::CGOpenMPRuntime::emitInlinedDirective(), emitOMPSimdRegion(), GetAlignedMapping(), clang::CodeGen::CodeGenModule::getLangOpts(), clang::CodeGen::CGOpenMPRuntime::getOMPBuilder(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), clang::CodeGen::RValue::getScalarVal(), clang::CodeGen::AggValueSlot::ignored(), isSimdSupportedByOpenMPIRBuilder(), and clang::CodeGen::CodeGenFunction::OMPFirstScanLoop.
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPGenericLoopDirective(), and clang::CodeGen::CodeGenFunction::EmitOMPSimdDirective().
◆ emitOMPSimdRegion()
Definition at line 2719 of file CGStmtOpenMP.cpp.
References clang::CodeGen::CGOpenMPRuntime::adjustTargetSpecificDataForLambdas(), clang::cast(), clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenFunction::ConstantFoldsToSimpleInteger(), clang::CodeGen::CodeGenFunction::createBasicBlock(), emitAlignedClause(), clang::CodeGen::CodeGenFunction::EmitBlock(), clang::CodeGen::CodeGenFunction::EmitBranch(), emitCommonSimdLoop(), clang::CodeGen::CodeGenFunction::EmitIgnoredExpr(), clang::CodeGen::CodeGenFunction::EmitLValue(), EmitOMPHelperVar(), clang::CodeGen::CodeGenFunction::EmitOMPInnerLoop(), clang::CodeGen::CodeGenFunction::EmitOMPLastprivateClauseFinal(), clang::CodeGen::CodeGenFunction::EmitOMPLastprivateClauseInit(), clang::CodeGen::CodeGenFunction::EmitOMPLinearClause(), clang::CodeGen::CodeGenFunction::EmitOMPLinearClauseFinal(), clang::CodeGen::CodeGenFunction::EmitOMPLinearClauseInit(), clang::CodeGen::CodeGenFunction::EmitOMPPrivateClause(), clang::CodeGen::CodeGenFunction::EmitOMPPrivateLoopCounters(), clang::CodeGen::CodeGenFunction::EmitOMPReductionClauseFinal(), clang::CodeGen::CodeGenFunction::EmitOMPReductionClauseInit(), clang::CodeGen::CodeGenFunction::EmitOMPSimdFinal(), clang::CodeGen::CodeGenFunction::EmitOMPSimdInit(), emitPostUpdateForReductionClause(), emitPreCond(), clang::CodeGen::CodeGenFunction::EmitVarDecl(), clang::CodeGen::PrePostActionTy::Enter(), getEffectiveDirectiveKind(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), clang::CodeGen::CodeGenFunction::getProfileCount(), clang::CodeGen::CodeGenFunction::incrementProfileCounter(), clang::isOpenMPDistributeDirective(), clang::isOpenMPGenericLoopDirective(), clang::isOpenMPTargetExecutionDirective(), clang::isOpenMPTaskLoopDirective(), clang::isOpenMPWorksharingDirective(), clang::CodeGen::CodeGenFunction::OMPPrivateScope::Privatize(), clang::CodeGen::CodeGenFunction::RunCleanupsScope::requiresCleanups(), and clang::CodeGen::CodeGenFunction::OMPPrivateScope::restoreMap().
Referenced by emitOMPSimdDirective(), clang::CodeGen::CodeGenFunction::EmitOMPTargetSimdDeviceFunction(), clang::CodeGen::CodeGenFunction::EmitOMPTargetSimdDirective(), and clang::CodeGen::CodeGenFunction::EmitSimpleOMPExecutableDirective().
◆ emitOutlinedFunctionPrologue()
Definition at line 506 of file CGStmtOpenMP.cpp.
References clang::CodeGen::CodeGenTypes::arrangeBuiltinFunctionDeclaration(), clang::CodeGen::CodeGenTypes::arrangeDeviceKernelCallerDeclaration(), clang::CapturedStmt::captures(), castValueFromUintptr(), clang::CodeGen::CodeGenFunction::CGM, clang::FunctionDecl::Create(), clang::ImplicitParamDecl::Create(), clang::ParmVarDecl::Create(), clang::CodeGen::Decl, clang::CodeGen::CodeGenFunction::EmitLoadOfPointer(), clang::CodeGen::CodeGenFunction::EmitLoadOfReference(), clang::CodeGen::CodeGenFunction::EmitLoadOfScalar(), clang::RecordDecl::fields(), clang::IdentifierTable::get(), clang::CodeGen::CodeGenFunction::GetAddrOfLocalVar(), clang::CapturedStmt::getBeginLoc(), clang::DeclaratorDecl::getBeginLoc(), clang::Stmt::getBeginLoc(), clang::CapturedDecl::getBody(), getCanonicalParamType(), clang::CapturedStmt::getCapturedDecl(), clang::CapturedStmt::getCapturedRecordDecl(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), clang::CodeGen::CodeGenModule::getContext(), clang::CapturedDecl::getContextParamPosition(), clang::ASTContext::getDeclAlign(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::ASTContext::getFunctionType(), clang::NamedDecl::getIdentifier(), clang::Decl::getLocation(), clang::CodeGen::CodeGenModule::getModule(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), clang::CodeGen::CGOpenMPRuntime::getParameterAddress(), clang::VariableArrayType::getSizeExpr(), clang::VarDecl::getTLSKind(), clang::ASTContext::getTranslationUnitDecl(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::CodeGen::Address::getType(), clang::ValueDecl::getType(), getType(), clang::CodeGen::CodeGenModule::getTypes(), clang::ASTContext::getUIntPtrType(), clang::Decl::hasBody(), clang::ASTContext::Idents, clang::CodeGen::Address::invalid(), clang::CapturedDecl::isNothrow(), clang::Type::isPointerType(), clang::Type::isVariablyModifiedType(), clang::CodeGen::CodeGenFunction::MakeAddrLValue(), clang::Other, clang::CapturedDecl::param_begin(), clang::CapturedDecl::param_end(), clang::SC_None, clang::SC_Static, clang::CodeGen::CodeGenModule::SetInternalFunctionAttributes(), clang::CodeGen::CodeGenFunction::StartFunction(), clang::ThreadPrivateVar, clang::VarDecl::TLS_None, clang::CodeGen::CGOpenMPRuntime::translateParameter(), clang::ASTContext::VoidTy, and clang::CodeGen::Address::withAlignment().
Referenced by clang::CodeGen::CodeGenFunction::GenerateOpenMPCapturedStmtFunction().
◆ emitOutlinedOrderedFunction()
◆ emitPostUpdateForReductionClause()
Definition at line 1544 of file CGStmtOpenMP.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::C, clang::Cond, clang::CodeGen::CodeGenFunction::createBasicBlock(), clang::CodeGen::CodeGenFunction::EmitBlock(), clang::CodeGen::CodeGenFunction::EmitIgnoredExpr(), and clang::CodeGen::CodeGenFunction::HaveInsertPoint().
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPDistributeLoop(), clang::CodeGen::CodeGenFunction::EmitOMPParallelDirective(), clang::CodeGen::CodeGenFunction::EmitOMPParallelMaskedDirective(), clang::CodeGen::CodeGenFunction::EmitOMPParallelMasterDirective(), emitOMPSimdRegion(), clang::CodeGen::CodeGenFunction::EmitOMPTeamsDirective(), clang::CodeGen::CodeGenFunction::EmitOMPTeamsDistributeDirective(), clang::CodeGen::CodeGenFunction::EmitOMPTeamsDistributeParallelForDirective(), clang::CodeGen::CodeGenFunction::EmitOMPTeamsDistributeParallelForSimdDirective(), clang::CodeGen::CodeGenFunction::EmitOMPTeamsDistributeSimdDirective(), clang::CodeGen::CodeGenFunction::EmitOMPTeamsGenericLoopDirective(), clang::CodeGen::CodeGenFunction::EmitOMPWorksharingLoop(), emitTargetParallelRegion(), emitTargetTeamsDistributeParallelForRegion(), emitTargetTeamsDistributeParallelForSimdRegion(), emitTargetTeamsDistributeRegion(), emitTargetTeamsDistributeSimdRegion(), emitTargetTeamsGenericLoopRegionAsDistribute(), emitTargetTeamsGenericLoopRegionAsParallel(), and emitTargetTeamsRegion().
◆ emitPreCond()
| void emitPreCond ( CodeGenFunction & CGF, const OMPLoopDirective & S, const Expr * Cond, llvm::BasicBlock * TrueBlock, llvm::BasicBlock * FalseBlock, uint64_t TrueCount ) | static |
|---|
Definition at line 2429 of file CGStmtOpenMP.cpp.
References clang::CodeGen::CodeGenFunction::OMPMapVars::apply(), clang::cast(), clang::Cond, clang::CodeGen::CodeGenFunction::CreateMemTemp(), clang::CodeGen::CodeGenFunction::EmitBranchOnBoolExpr(), clang::CodeGen::CodeGenFunction::EmitIgnoredExpr(), clang::CodeGen::CodeGenFunction::EmitOMPPrivateLoopCounters(), clang::QualType::getNonReferenceType(), clang::ValueDecl::getType(), clang::CodeGen::CodeGenFunction::HaveInsertPoint(), clang::CodeGen::CodeGenFunction::OMPPrivateScope::Privatize(), clang::CodeGen::CodeGenFunction::OMPMapVars::restore(), and clang::CodeGen::CodeGenFunction::OMPMapVars::setVarAddr().
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPDistributeLoop(), emitOMPSimdRegion(), clang::CodeGen::CodeGenFunction::EmitOMPTaskLoopBasedDirective(), and clang::CodeGen::CodeGenFunction::EmitOMPWorksharingLoop().
◆ emitRestoreIP()
template
| void emitRestoreIP ( CodeGenFunction & CGF, const T * C, llvm::OpenMPIRBuilder::InsertPointTy AllocaIP, llvm::OpenMPIRBuilder & OMPBuilder ) | static |
|---|
Definition at line 6187 of file CGStmtOpenMP.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::C, clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenFunction::EmitScalarConversion(), clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::CodeGen::CodeGenModule::getContext(), clang::Expr::getExprLoc(), clang::ASTContext::getIntTypeForBitwidth(), clang::Expr::getType(), clang::CodeGen::CodeGenTypeCache::Int64Ty, and clang::T.
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPOrderedDirective().
◆ emitScanBasedDirective()
Emits the code for the directive with inscan reductions.
The code is the following:
#pragma omp ...
for (i: 0..<num_iters>) {
;
buffer[i] = red;
}
#pragma omp master
for (int k = 0; k != ceil(log2(num_iters)); ++k)
for (size cnt = last_iter; cnt >= pow(2, k); --k)
buffer[i] op= buffer[i-pow(2,k)];
#pragma omp barrier
#pragma omp ...
for (0..<num_iters>) {
red = InclusiveScan ? buffer[i] : buffer[i-1];
;
}
Definition at line 3909 of file CGStmtOpenMP.cpp.
References clang::CodeGen::CodeGenFunction::OMPPrivateScope::addPrivate(), clang::CodeGen::CodeGenFunction::Builder, clang::C, clang::cast(), clang::CodeGen::ApplyDebugLocation::CreateDefaultArtificial(), clang::CodeGen::RValue::get(), clang::CodeGen::Address::invalid(), Next, clang::CodeGen::CodeGenFunction::OMPFirstScanLoop, clang::CodeGen::CodeGenFunction::OMPPrivateScope::Privatize(), and clang::CodeGen::CodeGenTypeCache::SizeTy.
Referenced by emitWorksharingDirective().
◆ emitScanBasedDirectiveDecls()
◆ emitScanBasedDirectiveFinals()
◆ emitSimdlenSafelenClause()
◆ emitSimpleAtomicLoad()
◆ emitSimpleAtomicStore()
| void emitSimpleAtomicStore ( CodeGenFunction & CGF, llvm::AtomicOrdering AO, LValue LVal, RValue RVal ) | static |
|---|
◆ emitTargetParallelForRegion()
◆ emitTargetParallelForSimdRegion()
◆ emitTargetParallelGenericLoopRegion()
◆ emitTargetParallelRegion()
Definition at line 7816 of file CGStmtOpenMP.cpp.
References clang::CodeGen::CGOpenMPRuntime::adjustTargetSpecificDataForLambdas(), clang::CodeGen::CodeGenFunction::CGM, emitCommonOMPParallelDirective(), emitEmptyBoundParameters(), clang::CodeGen::CodeGenFunction::EmitOMPFirstprivateClause(), clang::CodeGen::CodeGenFunction::EmitOMPPrivateClause(), clang::CodeGen::CodeGenFunction::EmitOMPReductionClauseFinal(), clang::CodeGen::CodeGenFunction::EmitOMPReductionClauseInit(), emitPostUpdateForReductionClause(), clang::CodeGen::CodeGenFunction::EmitStmt(), clang::CodeGen::PrePostActionTy::Enter(), clang::CapturedStmt::getCapturedStmt(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), clang::isOpenMPTargetExecutionDirective(), and clang::CodeGen::CodeGenFunction::OMPPrivateScope::Privatize().
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPTargetParallelDeviceFunction(), and clang::CodeGen::CodeGenFunction::EmitOMPTargetParallelDirective().
◆ emitTargetRegion()
Definition at line 7031 of file CGStmtOpenMP.cpp.
References clang::CodeGen::CGOpenMPRuntime::adjustTargetSpecificDataForLambdas(), clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenFunction::EmitOMPFirstprivateClause(), clang::CodeGen::CodeGenFunction::EmitOMPPrivateClause(), clang::CodeGen::CodeGenFunction::EmitStmt(), clang::CodeGen::CodeGenFunction::EnsureInsertPoint(), clang::CodeGen::PrePostActionTy::Enter(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), clang::isOpenMPTargetExecutionDirective(), and clang::CodeGen::CodeGenFunction::OMPPrivateScope::Privatize().
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPTargetDeviceFunction(), and clang::CodeGen::CodeGenFunction::EmitOMPTargetDirective().
◆ emitTargetTeamsDistributeParallelForRegion()
Definition at line 7408 of file CGStmtOpenMP.cpp.
References clang::CodeGen::CodeGenFunction::CGM, emitCommonOMPTeamsDirective(), clang::CodeGen::CGOpenMPRuntime::emitInlinedDirective(), emitInnerParallelForWhenCombined(), clang::CodeGen::CodeGenFunction::EmitOMPDistributeLoop(), clang::CodeGen::CodeGenFunction::EmitOMPReductionClauseFinal(), clang::CodeGen::CodeGenFunction::EmitOMPReductionClauseInit(), emitPostUpdateForReductionClause(), clang::CodeGen::PrePostActionTy::Enter(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), and clang::CodeGen::CodeGenFunction::OMPPrivateScope::Privatize().
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPTargetTeamsDistributeParallelForDeviceFunction(), and clang::CodeGen::CodeGenFunction::EmitOMPTargetTeamsDistributeParallelForDirective().
◆ emitTargetTeamsDistributeParallelForSimdRegion()
Definition at line 7459 of file CGStmtOpenMP.cpp.
References clang::CodeGen::CodeGenFunction::CGM, emitCommonOMPTeamsDirective(), clang::CodeGen::CGOpenMPRuntime::emitInlinedDirective(), emitInnerParallelForWhenCombined(), clang::CodeGen::CodeGenFunction::EmitOMPDistributeLoop(), clang::CodeGen::CodeGenFunction::EmitOMPReductionClauseFinal(), clang::CodeGen::CodeGenFunction::EmitOMPReductionClauseInit(), emitPostUpdateForReductionClause(), clang::CodeGen::PrePostActionTy::Enter(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), and clang::CodeGen::CodeGenFunction::OMPPrivateScope::Privatize().
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPTargetTeamsDistributeParallelForSimdDeviceFunction(), and clang::CodeGen::CodeGenFunction::EmitOMPTargetTeamsDistributeParallelForSimdDirective().
◆ emitTargetTeamsDistributeRegion()
Definition at line 7155 of file CGStmtOpenMP.cpp.
References clang::CodeGen::CodeGenFunction::CGM, emitCommonOMPTeamsDirective(), clang::CodeGen::CGOpenMPRuntime::emitInlinedDirective(), clang::CodeGen::CodeGenFunction::EmitOMPDistributeLoop(), emitOMPLoopBodyWithStopPoint(), clang::CodeGen::CodeGenFunction::EmitOMPReductionClauseFinal(), clang::CodeGen::CodeGenFunction::EmitOMPReductionClauseInit(), emitPostUpdateForReductionClause(), clang::CodeGen::PrePostActionTy::Enter(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), and clang::CodeGen::CodeGenFunction::OMPPrivateScope::Privatize().
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPTargetTeamsDistributeDeviceFunction(), and clang::CodeGen::CodeGenFunction::EmitOMPTargetTeamsDistributeDirective().
◆ emitTargetTeamsDistributeSimdRegion()
Definition at line 7200 of file CGStmtOpenMP.cpp.
References clang::CodeGen::CodeGenFunction::CGM, emitCommonOMPTeamsDirective(), clang::CodeGen::CGOpenMPRuntime::emitInlinedDirective(), clang::CodeGen::CodeGenFunction::EmitOMPDistributeLoop(), emitOMPLoopBodyWithStopPoint(), clang::CodeGen::CodeGenFunction::EmitOMPReductionClauseFinal(), clang::CodeGen::CodeGenFunction::EmitOMPReductionClauseInit(), emitPostUpdateForReductionClause(), clang::CodeGen::PrePostActionTy::Enter(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), and clang::CodeGen::CodeGenFunction::OMPPrivateScope::Privatize().
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPTargetTeamsDistributeSimdDeviceFunction(), and clang::CodeGen::CodeGenFunction::EmitOMPTargetTeamsDistributeSimdDirective().
◆ emitTargetTeamsGenericLoopRegionAsDistribute()
Definition at line 8406 of file CGStmtOpenMP.cpp.
References clang::CodeGen::CodeGenFunction::CGM, emitCommonOMPTeamsDirective(), clang::CodeGen::CGOpenMPRuntime::emitInlinedDirective(), clang::CodeGen::CodeGenFunction::EmitOMPDistributeLoop(), emitOMPLoopBodyWithStopPoint(), clang::CodeGen::CodeGenFunction::EmitOMPReductionClauseFinal(), clang::CodeGen::CodeGenFunction::EmitOMPReductionClauseInit(), emitPostUpdateForReductionClause(), emitTargetTeamsLoopCodegenStatus(), clang::CodeGen::PrePostActionTy::Enter(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), clang::CodeGen::CodeGenFunction::OMPPrivateScope::Privatize(), and TTL_CODEGEN_TYPE.
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPTargetTeamsGenericLoopDeviceFunction(), and clang::CodeGen::CodeGenFunction::EmitOMPTargetTeamsGenericLoopDirective().
◆ emitTargetTeamsGenericLoopRegionAsParallel()
Definition at line 8375 of file CGStmtOpenMP.cpp.
References clang::CodeGen::CodeGenFunction::CGM, emitCommonOMPTeamsDirective(), clang::CodeGen::CGOpenMPRuntime::emitInlinedDirective(), emitInnerParallelForWhenCombined(), clang::CodeGen::CodeGenFunction::EmitOMPDistributeLoop(), clang::CodeGen::CodeGenFunction::EmitOMPReductionClauseFinal(), clang::CodeGen::CodeGenFunction::EmitOMPReductionClauseInit(), emitPostUpdateForReductionClause(), emitTargetTeamsLoopCodegenStatus(), clang::CodeGen::PrePostActionTy::Enter(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), clang::CodeGen::CodeGenFunction::OMPPrivateScope::Privatize(), and TTL_CODEGEN_TYPE.
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPTargetTeamsGenericLoopDeviceFunction(), and clang::CodeGen::CodeGenFunction::EmitOMPTargetTeamsGenericLoopDirective().
◆ emitTargetTeamsLoopCodegenStatus()
◆ emitTargetTeamsRegion()
Definition at line 7110 of file CGStmtOpenMP.cpp.
References clang::CodeGen::CGOpenMPRuntime::adjustTargetSpecificDataForLambdas(), clang::CodeGen::CodeGenFunction::CGM, emitCommonOMPTeamsDirective(), clang::CodeGen::CodeGenFunction::EmitOMPFirstprivateClause(), clang::CodeGen::CodeGenFunction::EmitOMPPrivateClause(), clang::CodeGen::CodeGenFunction::EmitOMPReductionClauseFinal(), clang::CodeGen::CodeGenFunction::EmitOMPReductionClauseInit(), emitPostUpdateForReductionClause(), clang::CodeGen::CodeGenFunction::EmitStmt(), clang::CodeGen::PrePostActionTy::Enter(), clang::CapturedStmt::getCapturedStmt(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), clang::isOpenMPTargetExecutionDirective(), and clang::CodeGen::CodeGenFunction::OMPPrivateScope::Privatize().
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPTargetTeamsDeviceFunction(), and clang::CodeGen::CodeGenFunction::EmitOMPTargetTeamsDirective().
◆ emitWorksharingDirective()
Definition at line 4052 of file CGStmtOpenMP.cpp.
References clang::C, clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CGOpenMPRuntime::emitBarrierCall(), emitDispatchForLoopBounds(), emitForLoopBounds(), clang::CodeGen::CodeGenFunction::EmitOMPWorksharingLoop(), clang::CodeGen::CodeGenFunction::EmitScalarExpr(), emitScanBasedDirective(), emitScanBasedDirectiveDecls(), emitScanBasedDirectiveFinals(), getEffectiveDirectiveKind(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), and clang::isOpenMPParallelDirective().
Referenced by emitOMPForDirective(), clang::CodeGen::CodeGenFunction::EmitOMPForSimdDirective(), clang::CodeGen::CodeGenFunction::EmitOMPParallelForDirective(), clang::CodeGen::CodeGenFunction::EmitOMPParallelForSimdDirective(), and clang::CodeGen::CodeGenFunction::EmitOMPParallelGenericLoopDirective().
◆ GetAlignedMapping()
◆ getBaseDecl()
◆ getCanonicalParamType()
◆ getEffectiveDirectiveKind()
Definition at line 343 of file CGStmtOpenMP.cpp.
References clang::C, and clang::OMPC_BIND_unknown.
Referenced by emitCommonSimdLoop(), emitInnerParallelForWhenCombined(), clang::CodeGen::CodeGenFunction::EmitOMPFirstprivateClause(), clang::CodeGen::CodeGenFunction::EmitOMPLastprivateClauseInit(), clang::CodeGen::CodeGenFunction::EmitOMPLinearClause(), clang::CodeGen::CodeGenFunction::EmitOMPLoopBody(), clang::CodeGen::CodeGenFunction::EmitOMPReductionClauseFinal(), clang::CodeGen::CodeGenFunction::EmitOMPReductionClauseInit(), clang::CodeGen::CodeGenFunction::EmitOMPSimdInit(), emitOMPSimdRegion(), clang::CodeGen::CodeGenFunction::EmitOMPTargetTaskBasedDirective(), clang::CodeGen::CodeGenFunction::EmitOMPTaskBasedDirective(), clang::CodeGen::CodeGenFunction::EmitOMPWorksharingLoop(), emitWorksharingDirective(), clang::CodeGen::CodeGenFunction::GenerateOpenMPCapturedStmtFunction(), and clang::CodeGen::CodeGenFunction::processInReduction().
◆ hasOrderedDirective()
| bool hasOrderedDirective ( const Stmt * S) | static |
|---|
◆ isAllocatableDecl()
◆ isForSupportedByOpenMPIRBuilder()
◆ isSimdSupportedByOpenMPIRBuilder()
◆ isSupportedByOpenMPIRBuilder()
| bool isSupportedByOpenMPIRBuilder ( const OMPTaskgroupDirective & T) | static |
|---|