|
MLIR 22.0.0git
|
#include "mlir/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.h"#include "mlir/Analysis/TopologicalSortUtils.h"#include "mlir/Dialect/LLVMIR/LLVMDialect.h"#include "mlir/Dialect/LLVMIR/LLVMTypes.h"#include "mlir/Dialect/OpenMP/OpenMPDialect.h"#include "mlir/Dialect/OpenMP/OpenMPInterfaces.h"#include "mlir/IR/Operation.h"#include "mlir/Support/LLVM.h"#include "mlir/Target/LLVMIR/Dialect/OpenMPCommon.h"#include "mlir/Target/LLVMIR/ModuleTranslation.h"#include "llvm/ADT/ArrayRef.h"#include "llvm/ADT/SmallVector.h"#include "llvm/ADT/TypeSwitch.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/DerivedTypes.h"#include "llvm/IR/IRBuilder.h"#include "llvm/IR/MDBuilder.h"#include "llvm/IR/ReplaceConstant.h"#include "llvm/Support/FileSystem.h"#include "llvm/Support/VirtualFileSystem.h"#include "llvm/TargetParser/Triple.h"#include "llvm/Transforms/Utils/ModuleUtils.h"#include <cstdint>#include <iterator>#include <numeric>#include <optional>#include <utility>Go to the source code of this file.
Classes | |
| struct | PrivateVarsInfo |
| A util to collect info needed to convert delayed privatizers from MLIR to LLVM. More... | |
Functions | |
| static omp::PrivateClauseOp | findPrivatizer (Operation *from, SymbolRefAttr symbolName) |
| Looks up from the operation from and returns the PrivateClauseOp with name symbolName. | |
| static LogicalResult | checkImplementationStatus (Operation &op) |
| Check whether translation to LLVM IR for the given operation is currently supported. | |
| static LogicalResult | handleError (llvm::Error error, Operation &op) |
| template<typename T> | |
| static LogicalResult | handleError (llvm::Expected< T > &result, Operation &op) |
| static llvm::OpenMPIRBuilder::InsertPointTy | findAllocaInsertPoint (llvm::IRBuilderBase &builder, LLVM::ModuleTranslation &moduleTranslation) |
| Find the insertion point for allocas given the current insertion point for normal operations in the builder. | |
| static llvm::CanonicalLoopInfo * | findCurrentLoopInfo (LLVM::ModuleTranslation &moduleTranslation) |
| Find the loop information structure for the loop nest being translated. | |
| static llvm::Expected< llvm::BasicBlock * > | convertOmpOpRegions (Region ®ion, StringRef blockName, llvm::IRBuilderBase &builder, LLVM::ModuleTranslation &moduleTranslation, SmallVectorImpl< llvm::PHINode * > *continuationBlockPHIs=nullptr) |
| Converts the given region that appears within an OpenMP dialect operation to LLVM IR, creating a branch from the sourceBlock to the entry block of the region, and a branch from any block with an successor-less OpenMP terminator to continuationBlock. | |
| static llvm::omp::ProcBindKind | getProcBindKind (omp::ClauseProcBindKind kind) |
| Convert ProcBindKind from MLIR-generated enum to LLVM enum. | |
| static void | forwardArgs (LLVM::ModuleTranslation &moduleTranslation, omp::BlockArgOpenMPOpInterface blockArgIface) |
Maps block arguments from blockArgIface (which are MLIR values) to the corresponding LLVM values of the interface's operands. | |
| static LogicalResult | convertOmpMasked (Operation &opInst, llvm::IRBuilderBase &builder, LLVM::ModuleTranslation &moduleTranslation) |
| Converts an OpenMP 'masked' operation into LLVM IR using OpenMPIRBuilder. | |
| static LogicalResult | convertOmpMaster (Operation &opInst, llvm::IRBuilderBase &builder, LLVM::ModuleTranslation &moduleTranslation) |
| Converts an OpenMP 'master' operation into LLVM IR using OpenMPIRBuilder. | |
| static LogicalResult | convertOmpCritical (Operation &opInst, llvm::IRBuilderBase &builder, LLVM::ModuleTranslation &moduleTranslation) |
| Converts an OpenMP 'critical' operation into LLVM IR using OpenMPIRBuilder. | |
| template<typename T> | |
| static void | collectReductionDecls (T op, SmallVectorImpl< omp::DeclareReductionOp > &reductions) |
| Populates reductions with reduction declarations used in the given op. | |
| static LogicalResult | inlineConvertOmpRegions (Region ®ion, StringRef blockName, llvm::IRBuilderBase &builder, LLVM::ModuleTranslation &moduleTranslation, SmallVectorImpl< llvm::Value * > *continuationBlockArgs=nullptr) |
| Translates the blocks contained in the given region and appends them to at the current insertion point of builder. | |
| static OwningReductionGen | makeReductionGen (omp::DeclareReductionOp decl, llvm::IRBuilderBase &builder, LLVM::ModuleTranslation &moduleTranslation) |
| Create an OpenMPIRBuilder-compatible reduction generator for the given reduction declaration. | |
| static OwningAtomicReductionGen | makeAtomicReductionGen (omp::DeclareReductionOp decl, llvm::IRBuilderBase &builder, LLVM::ModuleTranslation &moduleTranslation) |
| Create an OpenMPIRBuilder-compatible atomic reduction generator for the given reduction declaration. | |
| static OwningDataPtrPtrReductionGen | makeRefDataPtrGen (omp::DeclareReductionOp decl, llvm::IRBuilderBase &builder, LLVM::ModuleTranslation &moduleTranslation, bool isByRef) |
| Create an OpenMPIRBuilder-compatible data_ptr_ptr reduction generator for the given reduction declaration. | |
| static LogicalResult | convertOmpOrdered (Operation &opInst, llvm::IRBuilderBase &builder, LLVM::ModuleTranslation &moduleTranslation) |
| Converts an OpenMP 'ordered' operation into LLVM IR using OpenMPIRBuilder. | |
| static LogicalResult | convertOmpOrderedRegion (Operation &opInst, llvm::IRBuilderBase &builder, LLVM::ModuleTranslation &moduleTranslation) |
| Converts an OpenMP 'ordered_region' operation into LLVM IR using OpenMPIRBuilder. | |
| template<typename T> | |
| static LogicalResult | allocReductionVars (T loop, ArrayRef< BlockArgument > reductionArgs, llvm::IRBuilderBase &builder, LLVM::ModuleTranslation &moduleTranslation, const llvm::OpenMPIRBuilder::InsertPointTy &allocaIP, SmallVectorImpl< omp::DeclareReductionOp > &reductionDecls, SmallVectorImpl< llvm::Value * > &privateReductionVariables, DenseMap< Value, llvm::Value * > &reductionVariableMap, SmallVectorImpl< DeferredStore > &deferredStores, llvm::ArrayRef< bool > isByRefs) |
| Allocate space for privatized reduction variables. | |
| template<typename T> | |
| static void | mapInitializationArgs (T loop, LLVM::ModuleTranslation &moduleTranslation, llvm::IRBuilderBase &builder, SmallVectorImpl< omp::DeclareReductionOp > &reductionDecls, DenseMap< Value, llvm::Value * > &reductionVariableMap, unsigned i) |
| Map input arguments to reduction initialization region. | |
| static void | setInsertPointForPossiblyEmptyBlock (llvm::IRBuilderBase &builder, llvm::BasicBlock *block=nullptr) |
| allocatedType moduleTranslation static convertType(allocatedType) LogicalResult | inlineOmpRegionCleanup (llvm::SmallVectorImpl< Region * > &cleanupRegions, llvm::ArrayRef< llvm::Value * > privateVariables, LLVM::ModuleTranslation &moduleTranslation, llvm::IRBuilderBase &builder, StringRef regionName, bool shouldLoadCleanupRegionArg=true) |
| handling of DeclareReductionOp's cleanup region | |
| template<class OP> | |
| static LogicalResult | createReductionsAndCleanup (OP op, llvm::IRBuilderBase &builder, LLVM::ModuleTranslation &moduleTranslation, llvm::OpenMPIRBuilder::InsertPointTy &allocaIP, SmallVectorImpl< omp::DeclareReductionOp > &reductionDecls, ArrayRef< llvm::Value * > privateReductionVariables, ArrayRef< bool > isByRef, bool isNowait=false, bool isTeamsReduction=false) |
| static ArrayRef< bool > | getIsByRef (std::optional< ArrayRef< bool > > attr) |
| template<typename OP> | |
| static LogicalResult | allocAndInitializeReductionVars (OP op, ArrayRef< BlockArgument > reductionArgs, llvm::IRBuilderBase &builder, LLVM::ModuleTranslation &moduleTranslation, llvm::OpenMPIRBuilder::InsertPointTy &allocaIP, SmallVectorImpl< omp::DeclareReductionOp > &reductionDecls, SmallVectorImpl< llvm::Value * > &privateReductionVariables, DenseMap< Value, llvm::Value * > &reductionVariableMap, llvm::ArrayRef< bool > isByRef) |
| static llvm::Value * | findAssociatedValue (Value privateVar, llvm::IRBuilderBase &builder, LLVM::ModuleTranslation &moduleTranslation, llvm::DenseMap< Value, Value > *mappedPrivateVars=nullptr) |
| Return the llvm::Value * corresponding to the privateVar that is being privatized. It isn't always as simple as looking up moduleTranslation with privateVar. For instance, in case of an allocatable, the descriptor for the allocatable is privatized. This descriptor is mapped using an MapInfoOp. So, this function will return a pointer to the llvm::Value corresponding to the block argument for the mapped descriptor. | |
| static llvm::Expected< llvm::Value * > | initPrivateVar (llvm::IRBuilderBase &builder, LLVM::ModuleTranslation &moduleTranslation, omp::PrivateClauseOp &privDecl, Value mlirPrivVar, BlockArgument &blockArg, llvm::Value *llvmPrivateVar, llvm::BasicBlock *privInitBlock, llvm::DenseMap< Value, Value > *mappedPrivateVars=nullptr) |
| Initialize a single (first)private variable. You probably want to use allocateAndInitPrivateVars instead of this. This returns the private variable which has been initialized. This variable should be mapped before constructing the body of the Op. | |
| static llvm::Error | initPrivateVars (llvm::IRBuilderBase &builder, LLVM::ModuleTranslation &moduleTranslation, PrivateVarsInfo &privateVarsInfo, llvm::DenseMap< Value, Value > *mappedPrivateVars=nullptr) |
| static llvm::Expected< llvm::BasicBlock * > | allocatePrivateVars (llvm::IRBuilderBase &builder, LLVM::ModuleTranslation &moduleTranslation, PrivateVarsInfo &privateVarsInfo, const llvm::OpenMPIRBuilder::InsertPointTy &allocaIP, llvm::DenseMap< Value, Value > *mappedPrivateVars=nullptr) |
| Allocate and initialize delayed private variables. Returns the basic block which comes after all of these allocations. llvm::Value * for each of these private variables are populated in llvmPrivateVars. | |
| static bool | opIsInSingleThread (mlir::Operation *op) |
| This can't always be determined statically, but when we can, it is good to avoid generating compiler-added barriers which will deadlock the program. | |
| static LogicalResult | copyFirstPrivateVars (mlir::Operation *op, llvm::IRBuilderBase &builder, LLVM::ModuleTranslation &moduleTranslation, SmallVectorImpl< mlir::Value > &mlirPrivateVars, ArrayRef< llvm::Value * > llvmPrivateVars, SmallVectorImpl< omp::PrivateClauseOp > &privateDecls, bool insertBarrier, llvm::DenseMap< Value, Value > *mappedPrivateVars=nullptr) |
| static LogicalResult | cleanupPrivateVars (llvm::IRBuilderBase &builder, LLVM::ModuleTranslation &moduleTranslation, Location loc, SmallVectorImpl< llvm::Value * > &llvmPrivateVars, SmallVectorImpl< omp::PrivateClauseOp > &privateDecls) |
| static bool | constructIsCancellable (Operation *op) |
| Returns true if the construct contains omp.cancel or omp.cancellation_point. | |
| static LogicalResult | convertOmpSections (Operation &opInst, llvm::IRBuilderBase &builder, LLVM::ModuleTranslation &moduleTranslation) |
| static LogicalResult | convertOmpSingle (omp::SingleOp &singleOp, llvm::IRBuilderBase &builder, LLVM::ModuleTranslation &moduleTranslation) |
| Converts an OpenMP single construct into LLVM IR using OpenMPIRBuilder. | |
| static bool | teamsReductionContainedInDistribute (omp::TeamsOp teamsOp) |
| static LogicalResult | convertOmpTeams (omp::TeamsOp op, llvm::IRBuilderBase &builder, LLVM::ModuleTranslation &moduleTranslation) |
| static void | buildDependData (std::optional< ArrayAttr > dependKinds, OperandRange dependVars, LLVM::ModuleTranslation &moduleTranslation, SmallVectorImpl< llvm::OpenMPIRBuilder::DependData > &dds) |
| static void | pushCancelFinalizationCB (SmallVectorImpl< llvm::BranchInst * > &cancelTerminators, llvm::IRBuilderBase &llvmBuilder, llvm::OpenMPIRBuilder &ompBuilder, mlir::Operation *op, llvm::omp::Directive cancelDirective) |
Shared implementation of a callback which adds a termiator for the new block created for the branch taken when an openmp construct is cancelled. The terminator is saved in cancelTerminators. This callback is invoked only if there is cancellation inside of the taskgroup body. The terminator will need to be fixed to branch to the correct block to cleanup the construct. | |
| static void | popCancelFinalizationCB (const ArrayRef< llvm::BranchInst * > cancelTerminators, llvm::OpenMPIRBuilder &ompBuilder, const llvm::OpenMPIRBuilder::InsertPointTy &afterIP) |
| If we cancelled the construct, we should branch to the finalization block of that construct. OMPIRBuilder structures the CFG such that the cleanup block is immediately before the continuation block. Now this finalization has been created we can fix the branch. | |
| static LogicalResult | convertOmpTaskOp (omp::TaskOp taskOp, llvm::IRBuilderBase &builder, LLVM::ModuleTranslation &moduleTranslation) |
| Converts an OpenMP task construct into LLVM IR using OpenMPIRBuilder. | |
| static LogicalResult | convertOmpTaskgroupOp (omp::TaskgroupOp tgOp, llvm::IRBuilderBase &builder, LLVM::ModuleTranslation &moduleTranslation) |
| Converts an OpenMP taskgroup construct into LLVM IR using OpenMPIRBuilder. | |
| static LogicalResult | convertOmpTaskwaitOp (omp::TaskwaitOp twOp, llvm::IRBuilderBase &builder, LLVM::ModuleTranslation &moduleTranslation) |
| static LogicalResult | convertOmpWsloop (Operation &opInst, llvm::IRBuilderBase &builder, LLVM::ModuleTranslation &moduleTranslation) |
| Converts an OpenMP workshare loop into LLVM IR using OpenMPIRBuilder. | |
| static LogicalResult | convertOmpParallel (omp::ParallelOp opInst, llvm::IRBuilderBase &builder, LLVM::ModuleTranslation &moduleTranslation) |
| Converts the OpenMP parallel operation to LLVM IR. | |
| static llvm::omp::OrderKind | convertOrderKind (std::optional< omp::ClauseOrderKind > o) |
| Convert Order attribute to llvm::omp::OrderKind. | |
| static LogicalResult | convertOmpSimd (Operation &opInst, llvm::IRBuilderBase &builder, LLVM::ModuleTranslation &moduleTranslation) |
| Converts an OpenMP simd loop into LLVM IR using OpenMPIRBuilder. | |
| static LogicalResult | convertOmpLoopNest (Operation &opInst, llvm::IRBuilderBase &builder, LLVM::ModuleTranslation &moduleTranslation) |
| Converts an OpenMP loop nest into LLVM IR using OpenMPIRBuilder. | |
| static LogicalResult | convertOmpCanonicalLoopOp (omp::CanonicalLoopOp op, llvm::IRBuilderBase &builder, LLVM::ModuleTranslation &moduleTranslation) |
| Convert an omp.canonical_loop to LLVM-IR. | |
| static LogicalResult | applyUnrollHeuristic (omp::UnrollHeuristicOp op, llvm::IRBuilderBase &builder, LLVM::ModuleTranslation &moduleTranslation) |
| Apply a #pragma omp unroll / "!$omp unroll" transformation using the OpenMPIRBuilder. | |
| static LogicalResult | applyTile (omp::TileOp op, llvm::IRBuilderBase &builder, LLVM::ModuleTranslation &moduleTranslation) |
| Apply a #pragma omp tile / !$omp tile transformation using the OpenMPIRBuilder. | |
| static llvm::AtomicOrdering | convertAtomicOrdering (std::optional< omp::ClauseMemoryOrderKind > ao) |
| Convert an Atomic Ordering attribute to llvm::AtomicOrdering. | |
| static LogicalResult | convertOmpAtomicRead (Operation &opInst, llvm::IRBuilderBase &builder, LLVM::ModuleTranslation &moduleTranslation) |
| Convert omp.atomic.read operation to LLVM IR. | |
| static LogicalResult | convertOmpAtomicWrite (Operation &opInst, llvm::IRBuilderBase &builder, LLVM::ModuleTranslation &moduleTranslation) |
| Converts an omp.atomic.write operation to LLVM IR. | |
| static llvm::AtomicRMWInst::BinOp | convertBinOpToAtomic (Operation &op) |
| Converts an LLVM dialect binary operation to the corresponding enum value for atomicrmw supported binary operation. | |
| static void | extractAtomicControlFlags (omp::AtomicUpdateOp atomicUpdateOp, bool &isIgnoreDenormalMode, bool &isFineGrainedMemory, bool &isRemoteMemory) |
| static LogicalResult | convertOmpAtomicUpdate (omp::AtomicUpdateOp &opInst, llvm::IRBuilderBase &builder, LLVM::ModuleTranslation &moduleTranslation) |
| Converts an OpenMP atomic update operation using OpenMPIRBuilder. | |
| static LogicalResult | convertOmpAtomicCapture (omp::AtomicCaptureOp atomicCaptureOp, llvm::IRBuilderBase &builder, LLVM::ModuleTranslation &moduleTranslation) |
| static llvm::omp::Directive | convertCancellationConstructType (omp::ClauseCancellationConstructType directive) |
| static LogicalResult | convertOmpCancel (omp::CancelOp op, llvm::IRBuilderBase &builder, LLVM::ModuleTranslation &moduleTranslation) |
| static LogicalResult | convertOmpCancellationPoint (omp::CancellationPointOp op, llvm::IRBuilderBase &builder, LLVM::ModuleTranslation &moduleTranslation) |
| static LogicalResult | convertOmpThreadprivate (Operation &opInst, llvm::IRBuilderBase &builder, LLVM::ModuleTranslation &moduleTranslation) |
| Converts an OpenMP Threadprivate operation into LLVM IR using OpenMPIRBuilder. | |
| static llvm::OffloadEntriesInfoManager::OMPTargetDeviceClauseKind | convertToDeviceClauseKind (mlir::omp::DeclareTargetDeviceType deviceClause) |
| static llvm::OffloadEntriesInfoManager::OMPTargetGlobalVarEntryKind | convertToCaptureClauseKind (mlir::omp::DeclareTargetCaptureClause captureClause) |
| static Operation * | getGlobalOpFromValue (Value value) |
| static llvm::SmallString< 64 > | getDeclareTargetRefPtrSuffix (LLVM::GlobalOp globalOp, llvm::OpenMPIRBuilder &ompBuilder) |
| static bool | isDeclareTargetLink (Value value) |
| static bool | isDeclareTargetTo (Value value) |
| static llvm::Value * | getRefPtrIfDeclareTarget (Value value, LLVM::ModuleTranslation &moduleTranslation) |
| static uint64_t | getArrayElementSizeInBits (LLVM::LLVMArrayType arrTy, DataLayout &dl) |
| static llvm::Value * | getSizeInBytes (DataLayout &dl, const mlir::Type &type, Operation *clauseOp, llvm::Value *basePointer, llvm::Type *baseType, llvm::IRBuilderBase &builder, LLVM::ModuleTranslation &moduleTranslation) |
| static llvm::omp::OpenMPOffloadMappingFlags | convertClauseMapFlags (omp::ClauseMapFlags mlirFlags) |
| static void | collectMapDataFromMapOperands (MapInfoData &mapData, SmallVectorImpl< Value > &mapVars, LLVM::ModuleTranslation &moduleTranslation, DataLayout &dl, llvm::IRBuilderBase &builder, ArrayRef< Value > useDevPtrOperands={}, ArrayRef< Value > useDevAddrOperands={}, ArrayRef< Value > hasDevAddrOperands={}) |
| static int | getMapDataMemberIdx (MapInfoData &mapData, omp::MapInfoOp memberOp) |
| static void | sortMapIndices (llvm::SmallVectorImpl< size_t > &indices, omp::MapInfoOp mapInfo) |
| static omp::MapInfoOp | getFirstOrLastMappedMemberPtr (omp::MapInfoOp mapInfo, bool first) |
| static std::vector< llvm::Value * > | calculateBoundsOffset (LLVM::ModuleTranslation &moduleTranslation, llvm::IRBuilderBase &builder, bool isArrayTy, OperandRange bounds) |
| This function calculates the array/pointer offset for map data provided with bounds operations, e.g. when provided something like the following: | |
| static void | getAsIntegers (ArrayAttr values, llvm::SmallVector< int64_t > &ints) |
| static void | getOverlappedMembers (llvm::SmallVectorImpl< size_t > &overlapMapDataIdxs, omp::MapInfoOp parentOp) |
| static bool | checkIfPointerMap (omp::MapInfoOp mapOp) |
| static llvm::omp::OpenMPOffloadMappingFlags | mapParentWithMembers (LLVM::ModuleTranslation &moduleTranslation, llvm::IRBuilderBase &builder, llvm::OpenMPIRBuilder &ompBuilder, DataLayout &dl, MapInfosTy &combinedInfo, MapInfoData &mapData, uint64_t mapDataIndex, TargetDirectiveEnumTy targetDirective) |
| static void | processMapMembersWithParent (LLVM::ModuleTranslation &moduleTranslation, llvm::IRBuilderBase &builder, llvm::OpenMPIRBuilder &ompBuilder, DataLayout &dl, MapInfosTy &combinedInfo, MapInfoData &mapData, uint64_t mapDataIndex, llvm::omp::OpenMPOffloadMappingFlags memberOfFlag, TargetDirectiveEnumTy targetDirective) |
| static void | processIndividualMap (MapInfoData &mapData, size_t mapDataIdx, MapInfosTy &combinedInfo, TargetDirectiveEnumTy targetDirective, int mapDataParentIdx=-1) |
| static void | processMapWithMembersOf (LLVM::ModuleTranslation &moduleTranslation, llvm::IRBuilderBase &builder, llvm::OpenMPIRBuilder &ompBuilder, DataLayout &dl, MapInfosTy &combinedInfo, MapInfoData &mapData, uint64_t mapDataIndex, TargetDirectiveEnumTy targetDirective) |
| static void | createAlteredByCaptureMap (MapInfoData &mapData, LLVM::ModuleTranslation &moduleTranslation, llvm::IRBuilderBase &builder) |
| static void | genMapInfos (llvm::IRBuilderBase &builder, LLVM::ModuleTranslation &moduleTranslation, DataLayout &dl, MapInfosTy &combinedInfo, MapInfoData &mapData, TargetDirectiveEnumTy targetDirective) |
| static llvm::Expected< llvm::Function * > | emitUserDefinedMapper (Operation *declMapperOp, llvm::IRBuilderBase &builder, LLVM::ModuleTranslation &moduleTranslation, llvm::StringRef mapperFuncName, TargetDirectiveEnumTy targetDirective) |
| static llvm::Expected< llvm::Function * > | getOrCreateUserDefinedMapperFunc (Operation *op, llvm::IRBuilderBase &builder, LLVM::ModuleTranslation &moduleTranslation, TargetDirectiveEnumTy targetDirective) |
| static LogicalResult | convertOmpTargetData (Operation *op, llvm::IRBuilderBase &builder, LLVM::ModuleTranslation &moduleTranslation) |
| static LogicalResult | convertOmpDistribute (Operation &opInst, llvm::IRBuilderBase &builder, LLVM::ModuleTranslation &moduleTranslation) |
| static LogicalResult | convertFlagsAttr (Operation *op, mlir::omp::FlagsAttr attribute, LLVM::ModuleTranslation &moduleTranslation) |
| Lowers the FlagsAttr which is applied to the module on the device pass when offloading, this attribute contains OpenMP RTL globals that can be passed as flags to the frontend, otherwise they are set to default. | |
| static void | getTargetEntryUniqueInfo (llvm::TargetRegionEntryInfo &targetInfo, omp::TargetOp targetOp, llvm::StringRef parentName="") |
| static void | handleDeclareTargetMapVar (MapInfoData &mapData, LLVM::ModuleTranslation &moduleTranslation, llvm::IRBuilderBase &builder, llvm::Function *func) |
| static llvm::IRBuilderBase::InsertPoint | createDeviceArgumentAccessor (MapInfoData &mapData, llvm::Argument &arg, llvm::Value *input, llvm::Value *&retVal, llvm::IRBuilderBase &builder, llvm::OpenMPIRBuilder &ompBuilder, LLVM::ModuleTranslation &moduleTranslation, llvm::IRBuilderBase::InsertPoint allocaIP, llvm::IRBuilderBase::InsertPoint codeGenIP) |
| static void | extractHostEvalClauses (omp::TargetOp targetOp, Value &numThreads, Value &numTeamsLower, Value &numTeamsUpper, Value &threadLimit, llvm::SmallVectorImpl< Value > *lowerBounds=nullptr, llvm::SmallVectorImpl< Value > *upperBounds=nullptr, llvm::SmallVectorImpl< Value > *steps=nullptr) |
| Follow uses of host_eval-defined block arguments of the given omp.target operation and populate output variables with their corresponding host value (i.e. operand evaluated outside of the target region), based on their uses inside of the target region. | |
| template<typename OpTy> | |
| static OpTy | castOrGetParentOfType (Operation *op, bool immediateParent=false) |
If op is of the given type parameter, return it casted to that type. Otherwise, if its immediate parent operation (or some other higher-level parent, if immediateParent is false) is of that type, return that parent casted to the given type. | |
| static std::optional< int64_t > | extractConstInteger (Value value) |
If the given value is defined by an llvm.mlir.constant operation and it is of an integer type, return its value. | |
| static uint64_t | getTypeByteSize (mlir::Type type, const DataLayout &dl) |
| template<typename OpTy> | |
| static uint64_t | getReductionDataSize (OpTy &op) |
| static void | initTargetDefaultAttrs (omp::TargetOp targetOp, Operation *capturedOp, llvm::OpenMPIRBuilder::TargetKernelDefaultAttrs &attrs, bool isTargetDevice, bool isGPU) |
| Populate default MinTeams, MaxTeams and MaxThreads to their default values as stated by the corresponding clauses, if constant. | |
| static void | initTargetRuntimeAttrs (llvm::IRBuilderBase &builder, LLVM::ModuleTranslation &moduleTranslation, omp::TargetOp targetOp, Operation *capturedOp, llvm::OpenMPIRBuilder::TargetKernelRuntimeAttrs &attrs) |
| Gather LLVM runtime values for all clauses evaluated in the host that are passed to the kernel invocation. | |
| static LogicalResult | convertOmpTarget (Operation &opInst, llvm::IRBuilderBase &builder, LLVM::ModuleTranslation &moduleTranslation) |
| static LogicalResult | convertDeclareTargetAttr (Operation *op, mlir::omp::DeclareTargetAttr attribute, LLVM::ModuleTranslation &moduleTranslation) |
| static bool | isTargetDeviceOp (Operation *op) |
| static llvm::Function * | getOmpTargetAlloc (llvm::IRBuilderBase &builder, llvm::Module *llvmModule) |
| static LogicalResult | convertTargetAllocMemOp (Operation &opInst, llvm::IRBuilderBase &builder, LLVM::ModuleTranslation &moduleTranslation) |
| static llvm::Function * | getOmpTargetFree (llvm::IRBuilderBase &builder, llvm::Module *llvmModule) |
| static LogicalResult | convertTargetFreeMemOp (Operation &opInst, llvm::IRBuilderBase &builder, LLVM::ModuleTranslation &moduleTranslation) |
| static LogicalResult | convertHostOrTargetOperation (Operation *op, llvm::IRBuilderBase &builder, LLVM::ModuleTranslation &moduleTranslation) |
| Given an OpenMP MLIR operation, create the corresponding LLVM IR (including OpenMP runtime calls). | |
| static LogicalResult | convertTargetDeviceOp (Operation *op, llvm::IRBuilderBase &builder, LLVM::ModuleTranslation &moduleTranslation) |
| static LogicalResult | convertTargetOpsInNest (Operation *op, llvm::IRBuilderBase &builder, LLVM::ModuleTranslation &moduleTranslation) |
Variables | |
| owningReductionGens [i] | |
| nullptr | |
| atomicGen | |
| owningDataPtrPtrReductionGens [i] | |
|
static |
Definition at line 1533 of file OpenMPToLLVMIRTranslation.cpp.
References allocReductionVars(), and success().
Referenced by convertOmpDistribute(), convertOmpSections(), and convertOmpTeams().
|
static |
Allocate and initialize delayed private variables. Returns the basic block which comes after all of these allocations. llvm::Value * for each of these private variables are populated in llvmPrivateVars.
Definition at line 1668 of file OpenMPToLLVMIRTranslation.cpp.
References PrivateVarsInfo::blockArgs, mlir::LLVM::ModuleTranslation::convertType(), mlir::LLVM::ModuleTranslation::getLLVMModule(), PrivateVarsInfo::llvmVars, PrivateVarsInfo::mlirVars, and PrivateVarsInfo::privatizers.
Referenced by convertOmpDistribute(), convertOmpParallel(), convertOmpSimd(), convertOmpTarget(), and convertOmpWsloop().
|
static |
Allocate space for privatized reduction variables.
deferredStores contains information to create store operations which needs to be inserted after all allocas
Definition at line 1156 of file OpenMPToLLVMIRTranslation.cpp.
References mlir::LLVM::ModuleTranslation::convertType(), mlir::Region::empty(), inlineConvertOmpRegions(), mlir::LLVM::ModuleTranslation::mapValue(), and success().
Referenced by allocAndInitializeReductionVars(), convertOmpParallel(), convertOmpSimd(), and convertOmpWsloop().
|
static |
Apply a #pragma omp tile / !$omp tile transformation using the OpenMPIRBuilder.
Definition at line 3356 of file OpenMPToLLVMIRTranslation.cpp.
References genLoop(), mlir::LLVM::ModuleTranslation::getOpenMPBuilder(), mlir::LLVM::ModuleTranslation::invalidateOmpLoop(), mlir::LLVM::ModuleTranslation::lookupOMPLoop(), mlir::LLVM::ModuleTranslation::lookupValue(), mlir::LLVM::ModuleTranslation::mapOmpLoop(), and success().
Referenced by convertHostOrTargetOperation().
|
static |
Apply a #pragma omp unroll / "!$omp unroll" transformation using the OpenMPIRBuilder.
Definition at line 3338 of file OpenMPToLLVMIRTranslation.cpp.
References mlir::LLVM::ModuleTranslation::getOpenMPBuilder(), mlir::LLVM::ModuleTranslation::invalidateOmpLoop(), mlir::LLVM::ModuleTranslation::lookupOMPLoop(), and success().
Referenced by convertHostOrTargetOperation().
|
static |
Definition at line 2100 of file OpenMPToLLVMIRTranslation.cpp.
References mlir::LLVM::ModuleTranslation::lookupValue().
Referenced by convertOmpTarget(), and convertOmpTaskOp().
|
static |
This function calculates the array/pointer offset for map data provided with bounds operations, e.g. when provided something like the following:
Fortran map(tofrom: array(2:5, 3:2))
We must calculate the initial pointer offset to pass across, this function performs this using bounds.
TODO/WARNING: This only supports Fortran's column major indexing currently as is noted in the note below and comments in the function, we must extend this function when we add a C++ frontend. NOTE: which while specified in row-major order it currently needs to be flipped for Fortran's column order array allocation and access (as opposed to C++'s row-major, hence the backwards processing where order is important). This is likely important to keep in mind for the future when we incorporate a C++ frontend, both frontends will need to agree on the ordering of generated bounds operations (one may have to flip them) to make the below lowering frontend agnostic. The offload size calcualtion may also have to be adjusted for C++.
Definition at line 4364 of file OpenMPToLLVMIRTranslation.cpp.
References mlir::LLVM::ModuleTranslation::lookupValue().
Referenced by createAlteredByCaptureMap().
|
static |
If op is of the given type parameter, return it casted to that type. Otherwise, if its immediate parent operation (or some other higher-level parent, if immediateParent is false) is of that type, return that parent casted to the given type.
If op is null or neither it or its parent(s) are of the specified type, return a null operation.
Definition at line 5762 of file OpenMPToLLVMIRTranslation.cpp.
References mlir::Operation::getParentOfType(), and mlir::Operation::getParentOp().
Referenced by initTargetDefaultAttrs(), and initTargetRuntimeAttrs().
|
static |
Definition at line 4485 of file OpenMPToLLVMIRTranslation.cpp.
References isDeclareTargetLink().
Referenced by createAlteredByCaptureMap(), mapParentWithMembers(), processIndividualMap(), and processMapMembersWithParent().
|
static |
Check whether translation to LLVM IR for the given operation is currently supported.
If not, descriptive diagnostics will be emitted to let users know this is a not-yet-implemented feature.
Definition at line 317 of file OpenMPToLLVMIRTranslation.cpp.
References mlir::Operation::emitError(), mlir::Operation::emitWarning(), mlir::Operation::getDialect(), mlir::Operation::getName(), mlir::Operation::getParentOp(), result, and success().
Referenced by convertHostOrTargetOperation(), convertOmpAtomicCapture(), convertOmpAtomicRead(), convertOmpAtomicUpdate(), convertOmpAtomicWrite(), convertOmpCancel(), convertOmpCancellationPoint(), convertOmpCritical(), convertOmpDistribute(), convertOmpMasked(), convertOmpMaster(), convertOmpOrdered(), convertOmpOrderedRegion(), convertOmpParallel(), convertOmpSections(), convertOmpSimd(), convertOmpSingle(), convertOmpTarget(), convertOmpTargetData(), convertOmpTaskgroupOp(), convertOmpTaskOp(), convertOmpTaskwaitOp(), convertOmpTeams(), convertOmpThreadprivate(), and convertOmpWsloop().
|
static |
Definition at line 1800 of file OpenMPToLLVMIRTranslation.cpp.
References mlir::emitError(), inlineOmpRegionCleanup(), and success().
Referenced by convertOmpDistribute(), convertOmpParallel(), convertOmpSimd(), convertOmpTaskOp(), and convertOmpWsloop().
|
static |
Definition at line 4108 of file OpenMPToLLVMIRTranslation.cpp.
Referenced by convertOmpTarget(), convertOmpTargetData(), and emitUserDefinedMapper().
|
static |
Populates reductions with reduction declarations used in the given op.
Definition at line 883 of file OpenMPToLLVMIRTranslation.cpp.
References mlir::SymbolTable::lookupNearestSymbolFrom().
Referenced by convertOmpDistribute(), convertOmpParallel(), convertOmpSections(), convertOmpSimd(), convertOmpTeams(), convertOmpWsloop(), and getReductionDataSize().
Returns true if the construct contains omp.cancel or omp.cancellation_point.
Definition at line 1821 of file OpenMPToLLVMIRTranslation.cpp.
References mlir::WalkResult::advance(), mlir::WalkResult::interrupt(), and mlir::Operation::walk().
Referenced by convertOmpParallel(), convertOmpSections(), and pushCancelFinalizationCB().
|
static |
Convert an Atomic Ordering attribute to llvm::AtomicOrdering.
Definition at line 3395 of file OpenMPToLLVMIRTranslation.cpp.
Referenced by convertOmpAtomicCapture(), convertOmpAtomicRead(), convertOmpAtomicUpdate(), and convertOmpAtomicWrite().
|
static |
Converts an LLVM dialect binary operation to the corresponding enum value for atomicrmw supported binary operation.
Definition at line 3467 of file OpenMPToLLVMIRTranslation.cpp.
Referenced by convertOmpAtomicCapture(), and convertOmpAtomicUpdate().
|
static |
Definition at line 3684 of file OpenMPToLLVMIRTranslation.cpp.
Referenced by convertOmpCancel(), and convertOmpCancellationPoint().
|
static |
Definition at line 4052 of file OpenMPToLLVMIRTranslation.cpp.
References mapTypeToBool().
Referenced by processMapMembersWithParent().
|
static |
Definition at line 6336 of file OpenMPToLLVMIRTranslation.cpp.
References convertToCaptureClauseKind(), convertToDeviceClauseKind(), mlir::LocationAttr::findInstanceOf(), mlir::LLVM::ModuleTranslation::getLLVMModule(), mlir::Operation::getLoc(), mlir::LLVM::ModuleTranslation::getOpenMPBuilder(), mlir::Operation::getParentOfType(), mlir::LLVM::ModuleTranslation::lookupFunction(), mlir::SymbolTable::Private, and success().
|
static |
Lowers the FlagsAttr which is applied to the module on the device pass when offloading, this attribute contains OpenMP RTL globals that can be passed as flags to the frontend, otherwise they are set to default.
Definition at line 5447 of file OpenMPToLLVMIRTranslation.cpp.
References mlir::LLVM::ModuleTranslation::getOpenMPBuilder(), and success().
|
static |
Given an OpenMP MLIR operation, create the corresponding LLVM IR (including OpenMP runtime calls).
Definition at line 6540 of file OpenMPToLLVMIRTranslation.cpp.
References applyTile(), applyUnrollHeuristic(), checkImplementationStatus(), convertOmpAtomicCapture(), convertOmpAtomicRead(), convertOmpAtomicUpdate(), convertOmpAtomicWrite(), convertOmpCancel(), convertOmpCancellationPoint(), convertOmpCanonicalLoopOp(), convertOmpCritical(), convertOmpDistribute(), convertOmpLoopNest(), convertOmpMasked(), convertOmpMaster(), convertOmpOrdered(), convertOmpOrderedRegion(), convertOmpParallel(), convertOmpSections(), convertOmpSimd(), convertOmpSingle(), convertOmpTarget(), convertOmpTargetData(), convertOmpTaskgroupOp(), convertOmpTaskOp(), convertOmpTaskwaitOp(), convertOmpTeams(), convertOmpThreadprivate(), convertOmpWsloop(), convertTargetAllocMemOp(), convertTargetFreeMemOp(), mlir::Operation::emitError(), mlir::Operation::getName(), mlir::LLVM::ModuleTranslation::getOpenMPBuilder(), mlir::Operation::getParentOp(), handleError(), result, mlir::LLVM::ModuleTranslation::stackPop(), mlir::LLVM::ModuleTranslation::stackPush(), and success().
Referenced by convertTargetDeviceOp().
|
static |
Definition at line 3584 of file OpenMPToLLVMIRTranslation.cpp.
References mlir::Block::begin(), checkImplementationStatus(), convertAtomicOrdering(), convertBinOpToAtomic(), mlir::LLVM::ModuleTranslation::convertBlock(), mlir::LLVM::ModuleTranslation::convertType(), extractAtomicControlFlags(), findAllocaInsertPoint(), mlir::Region::front(), mlir::LLVM::ModuleTranslation::getOpenMPBuilder(), mlir::Operation::getOperand(), mlir::Operation::getOperands(), mlir::Operation::getRegion(), mlir::Block::getTerminator(), handleError(), mlir::LLVM::ModuleTranslation::lookupValue(), mlir::LLVM::ModuleTranslation::mapBlock(), mlir::LLVM::ModuleTranslation::mapValue(), and success().
Referenced by convertHostOrTargetOperation().
|
static |
Convert omp.atomic.read operation to LLVM IR.
Definition at line 3416 of file OpenMPToLLVMIRTranslation.cpp.
References checkImplementationStatus(), convertAtomicOrdering(), mlir::LLVM::ModuleTranslation::convertType(), findAllocaInsertPoint(), mlir::LLVM::ModuleTranslation::getOpenMPBuilder(), mlir::LLVM::ModuleTranslation::lookupValue(), and success().
Referenced by convertHostOrTargetOperation().
|
static |
Converts an OpenMP atomic update operation using OpenMPIRBuilder.
Definition at line 3500 of file OpenMPToLLVMIRTranslation.cpp.
References mlir::Block::begin(), checkImplementationStatus(), convertAtomicOrdering(), convertBinOpToAtomic(), mlir::LLVM::ModuleTranslation::convertBlock(), mlir::LLVM::ModuleTranslation::convertType(), extractAtomicControlFlags(), findAllocaInsertPoint(), mlir::Region::front(), mlir::LLVM::ModuleTranslation::getOpenMPBuilder(), mlir::Operation::getOperand(), mlir::Operation::getOperands(), mlir::Operation::getRegion(), mlir::Block::getTerminator(), handleError(), mlir::LLVM::ModuleTranslation::lookupValue(), mlir::LLVM::ModuleTranslation::mapBlock(), mlir::LLVM::ModuleTranslation::mapValue(), and success().
Referenced by convertHostOrTargetOperation().
|
static |
Converts an omp.atomic.write operation to LLVM IR.
Definition at line 3443 of file OpenMPToLLVMIRTranslation.cpp.
References checkImplementationStatus(), convertAtomicOrdering(), mlir::LLVM::ModuleTranslation::convertType(), findAllocaInsertPoint(), mlir::LLVM::ModuleTranslation::getOpenMPBuilder(), mlir::LLVM::ModuleTranslation::lookupValue(), and success().
Referenced by convertHostOrTargetOperation().
|
static |
Definition at line 3700 of file OpenMPToLLVMIRTranslation.cpp.
References checkImplementationStatus(), convertCancellationConstructType(), mlir::LLVM::ModuleTranslation::getOpenMPBuilder(), handleError(), mlir::LLVM::ModuleTranslation::lookupValue(), and success().
Referenced by convertHostOrTargetOperation().
|
static |
Definition at line 3727 of file OpenMPToLLVMIRTranslation.cpp.
References checkImplementationStatus(), convertCancellationConstructType(), mlir::LLVM::ModuleTranslation::getOpenMPBuilder(), handleError(), and success().
Referenced by convertHostOrTargetOperation().
|
static |
Convert an omp.canonical_loop to LLVM-IR.
Definition at line 3295 of file OpenMPToLLVMIRTranslation.cpp.
References convertOmpOpRegions(), mlir::LLVM::ModuleTranslation::getOpenMPBuilder(), mlir::LLVM::ModuleTranslation::lookupValue(), mlir::LLVM::ModuleTranslation::mapOmpLoop(), mlir::LLVM::ModuleTranslation::mapValue(), and success().
Referenced by convertHostOrTargetOperation().
|
static |
Converts an OpenMP 'critical' operation into LLVM IR using OpenMPIRBuilder.
Definition at line 796 of file OpenMPToLLVMIRTranslation.cpp.
References checkImplementationStatus(), convertOmpOpRegions(), mlir::LLVM::ModuleTranslation::getLLVMContext(), mlir::LLVM::ModuleTranslation::getOpenMPBuilder(), handleError(), mlir::SymbolTable::lookupNearestSymbolFrom(), and success().
Referenced by convertHostOrTargetOperation().
|
static |
Process teams op reduction in distribute if the reduction is contained in the distribute op.
Definition at line 5308 of file OpenMPToLLVMIRTranslation.cpp.
References allocAndInitializeReductionVars(), allocatePrivateVars(), checkImplementationStatus(), cleanupPrivateVars(), collectReductionDecls(), convertOmpOpRegions(), copyFirstPrivateVars(), createReductionsAndCleanup(), findAllocaInsertPoint(), findCurrentLoopInfo(), getIsByRef(), mlir::LLVM::ModuleTranslation::getOpenMPBuilder(), mlir::Operation::getParentOfType(), handleError(), initPrivateVars(), PrivateVarsInfo::llvmVars, mlir::LLVM::ModuleTranslation::lookupValue(), PrivateVarsInfo::mlirVars, PrivateVarsInfo::privatizers, success(), and teamsReductionContainedInDistribute().
Referenced by convertHostOrTargetOperation().
|
static |
Converts an OpenMP loop nest into LLVM IR using OpenMPIRBuilder.
Definition at line 3172 of file OpenMPToLLVMIRTranslation.cpp.
References convertOmpOpRegions(), mlir::LLVM::ModuleTranslation::getOpenMPBuilder(), handleError(), mlir::WalkResult::interrupt(), mlir::LLVM::ModuleTranslation::lookupValue(), mlir::LLVM::ModuleTranslation::mapValue(), mlir::LLVM::ModuleTranslation::stackWalk(), success(), and mlir::tile().
Referenced by convertHostOrTargetOperation().
|
static |
Converts an OpenMP 'masked' operation into LLVM IR using OpenMPIRBuilder.
Definition at line 717 of file OpenMPToLLVMIRTranslation.cpp.
References checkImplementationStatus(), convertOmpOpRegions(), mlir::LLVM::ModuleTranslation::getOpenMPBuilder(), handleError(), mlir::LLVM::ModuleTranslation::lookupValue(), and success().
Referenced by convertHostOrTargetOperation().
|
static |
Converts an OpenMP 'master' operation into LLVM IR using OpenMPIRBuilder.
Definition at line 761 of file OpenMPToLLVMIRTranslation.cpp.
References checkImplementationStatus(), convertOmpOpRegions(), mlir::LLVM::ModuleTranslation::getOpenMPBuilder(), handleError(), and success().
Referenced by convertHostOrTargetOperation().
|
static |
Converts the given region that appears within an OpenMP dialect operation to LLVM IR, creating a branch from the sourceBlock to the entry block of the region, and a branch from any block with an successor-less OpenMP terminator to continuationBlock.
Populates continuationBlockPHIs with the PHI nodes of the continuation block if provided.
Definition at line 563 of file OpenMPToLLVMIRTranslation.cpp.
References mlir::LLVM::detail::connectPHINodes(), mlir::LLVM::ModuleTranslation::convertBlock(), mlir::LLVM::ModuleTranslation::convertType(), mlir::LLVM::ModuleTranslation::forgetMapping(), mlir::Region::getBlocks(), mlir::getBlocksSortedByDominance(), mlir::Operation::getNumOperands(), mlir::Operation::getOperand(), mlir::Region::getParentOp(), mlir::LLVM::ModuleTranslation::lookupBlock(), mlir::LLVM::ModuleTranslation::lookupValue(), and mlir::LLVM::ModuleTranslation::mapBlock().
Referenced by convertOmpCanonicalLoopOp(), convertOmpCritical(), convertOmpDistribute(), convertOmpLoopNest(), convertOmpMasked(), convertOmpMaster(), convertOmpOrderedRegion(), convertOmpParallel(), convertOmpSections(), convertOmpSimd(), convertOmpSingle(), convertOmpTarget(), convertOmpTaskgroupOp(), convertOmpTaskOp(), convertOmpTeams(), convertOmpWsloop(), convertTargetOpsInNest(), and inlineConvertOmpRegions().
|
static |
Converts an OpenMP 'ordered' operation into LLVM IR using OpenMPIRBuilder.
Definition at line 1074 of file OpenMPToLLVMIRTranslation.cpp.
References checkImplementationStatus(), findAllocaInsertPoint(), mlir::LLVM::ModuleTranslation::getOpenMPBuilder(), mlir::LLVM::ModuleTranslation::lookupValues(), and success().
Referenced by convertHostOrTargetOperation().
|
static |
Converts an OpenMP 'ordered_region' operation into LLVM IR using OpenMPIRBuilder.
Definition at line 1107 of file OpenMPToLLVMIRTranslation.cpp.
References checkImplementationStatus(), convertOmpOpRegions(), mlir::LLVM::ModuleTranslation::getOpenMPBuilder(), handleError(), and success().
Referenced by convertHostOrTargetOperation().
|
static |
Converts the OpenMP parallel operation to LLVM IR.
Definition at line 2776 of file OpenMPToLLVMIRTranslation.cpp.
References allocatePrivateVars(), allocReductionVars(), checkImplementationStatus(), cleanupPrivateVars(), collectReductionDecls(), constructIsCancellable(), convertOmpOpRegions(), copyFirstPrivateVars(), findAllocaInsertPoint(), getIsByRef(), mlir::LLVM::ModuleTranslation::getOpenMPBuilder(), getProcBindKind(), handleError(), initPrivateVars(), inlineOmpRegionCleanup(), PrivateVarsInfo::llvmVars, mlir::LLVM::ModuleTranslation::lookupValue(), PrivateVarsInfo::mlirVars, owningReductionGens, PrivateVarsInfo::privatizers, and success().
Referenced by convertHostOrTargetOperation().
|
static |
Definition at line 1835 of file OpenMPToLLVMIRTranslation.cpp.
References allocAndInitializeReductionVars(), mlir::Region::begin(), checkImplementationStatus(), collectReductionDecls(), constructIsCancellable(), convertOmpOpRegions(), createReductionsAndCleanup(), findAllocaInsertPoint(), mlir::Region::getArguments(), getIsByRef(), mlir::Region::getNumArguments(), mlir::LLVM::ModuleTranslation::getOpenMPBuilder(), mlir::Operation::getRegion(), handleError(), mlir::LLVM::ModuleTranslation::lookupValue(), mlir::LLVM::ModuleTranslation::mapValue(), and success().
Referenced by convertHostOrTargetOperation().
|
static |
Converts an OpenMP simd loop into LLVM IR using OpenMPIRBuilder.
Definition at line 2976 of file OpenMPToLLVMIRTranslation.cpp.
References allocatePrivateVars(), allocReductionVars(), checkImplementationStatus(), cleanupPrivateVars(), collectReductionDecls(), convertOmpOpRegions(), convertOrderKind(), mlir::LLVM::ModuleTranslation::convertType(), findAllocaInsertPoint(), findCurrentLoopInfo(), getIsByRef(), mlir::LLVM::ModuleTranslation::getOpenMPBuilder(), handleError(), initPrivateVars(), inlineOmpRegionCleanup(), PrivateVarsInfo::llvmVars, mlir::LLVM::ModuleTranslation::lookupValue(), makeReductionGen(), PrivateVarsInfo::mlirVars, and PrivateVarsInfo::privatizers.
Referenced by convertHostOrTargetOperation().
|
static |
Converts an OpenMP single construct into LLVM IR using OpenMPIRBuilder.
Definition at line 1942 of file OpenMPToLLVMIRTranslation.cpp.
References checkImplementationStatus(), convertOmpOpRegions(), mlir::LLVM::ModuleTranslation::getOpenMPBuilder(), handleError(), mlir::LLVM::ModuleTranslation::lookupFunction(), mlir::SymbolTable::lookupNearestSymbolFrom(), mlir::LLVM::ModuleTranslation::lookupValue(), and success().
Referenced by convertHostOrTargetOperation().
|
static |
Definition at line 6016 of file OpenMPToLLVMIRTranslation.cpp.
References allocatePrivateVars(), buildDependData(), checkImplementationStatus(), collectMapDataFromMapOperands(), convertOmpOpRegions(), copyFirstPrivateVars(), createDeviceArgumentAccessor(), findAllocaInsertPoint(), findPrivatizer(), genMapInfos(), mlir::Value::getDefiningOp(), mlir::LLVM::ModuleTranslation::getOpenMPBuilder(), getOrCreateUserDefinedMapperFunc(), mlir::Operation::getParentOfType(), getTargetEntryUniqueInfo(), handleDeclareTargetMapVar(), handleError(), initPrivateVars(), initTargetDefaultAttrs(), initTargetRuntimeAttrs(), inlineOmpRegionCleanup(), PrivateVarsInfo::llvmVars, mlir::LLVM::ModuleTranslation::lookupFunction(), mlir::LLVM::ModuleTranslation::lookupValue(), mlir::LLVM::ModuleTranslation::mapValue(), PrivateVarsInfo::mlirVars, PrivateVarsInfo::privatizers, and success().
Referenced by convertHostOrTargetOperation(), and convertTargetOpsInNest().
|
static |
Definition at line 5052 of file OpenMPToLLVMIRTranslation.cpp.
References checkImplementationStatus(), collectMapDataFromMapOperands(), findAllocaInsertPoint(), genMapInfos(), mlir::LLVM::ModuleTranslation::getOpenMPBuilder(), getOrCreateUserDefinedMapperFunc(), mlir::Operation::getParentOfType(), handleError(), inlineConvertOmpRegions(), mlir::LLVM::ModuleTranslation::lookupValue(), mlir::LLVM::ModuleTranslation::mapValue(), result, and success().
Referenced by convertHostOrTargetOperation(), and convertTargetOpsInNest().
|
static |
Converts an OpenMP taskgroup construct into LLVM IR using OpenMPIRBuilder.
Definition at line 2528 of file OpenMPToLLVMIRTranslation.cpp.
References checkImplementationStatus(), convertOmpOpRegions(), findAllocaInsertPoint(), mlir::LLVM::ModuleTranslation::getOpenMPBuilder(), handleError(), and success().
Referenced by convertHostOrTargetOperation().
|
static |
Converts an OpenMP task construct into LLVM IR using OpenMPIRBuilder.
Definition at line 2296 of file OpenMPToLLVMIRTranslation.cpp.
References PrivateVarsInfo::blockArgs, buildDependData(), checkImplementationStatus(), cleanupPrivateVars(), convertOmpOpRegions(), mlir::LLVM::ModuleTranslation::convertType(), copyFirstPrivateVars(), findAllocaInsertPoint(), mlir::LLVM::ModuleTranslation::getOpenMPBuilder(), handleError(), initPrivateVar(), PrivateVarsInfo::llvmVars, mlir::LLVM::ModuleTranslation::lookupValue(), mlir::LLVM::ModuleTranslation::mapValue(), PrivateVarsInfo::mlirVars, popCancelFinalizationCB(), PrivateVarsInfo::privatizers, pushCancelFinalizationCB(), setInsertPointForPossiblyEmptyBlock(), and success().
Referenced by convertHostOrTargetOperation().
|
static |
Definition at line 2555 of file OpenMPToLLVMIRTranslation.cpp.
References checkImplementationStatus(), mlir::LLVM::ModuleTranslation::getOpenMPBuilder(), and success().
Referenced by convertHostOrTargetOperation().
|
static |
Definition at line 2021 of file OpenMPToLLVMIRTranslation.cpp.
References allocAndInitializeReductionVars(), checkImplementationStatus(), collectReductionDecls(), convertOmpOpRegions(), createReductionsAndCleanup(), findAllocaInsertPoint(), getIsByRef(), mlir::LLVM::ModuleTranslation::getOpenMPBuilder(), handleError(), mlir::LLVM::ModuleTranslation::lookupValue(), success(), and teamsReductionContainedInDistribute().
Referenced by convertHostOrTargetOperation().
|
static |
Converts an OpenMP Threadprivate operation into LLVM IR using OpenMPIRBuilder.
Definition at line 3753 of file OpenMPToLLVMIRTranslation.cpp.
References checkImplementationStatus(), mlir::Operation::emitError(), mlir::Value::getDefiningOp(), mlir::LLVM::ModuleTranslation::getOpenMPBuilder(), mlir::Operation::getOperand(), mlir::Operation::getResult(), mlir::LLVM::ModuleTranslation::lookupGlobal(), mlir::LLVM::ModuleTranslation::mapValue(), success(), and mlir::LLVM::ModuleTranslation::symbolTable().
Referenced by convertHostOrTargetOperation().
|
static |
Converts an OpenMP workshare loop into LLVM IR using OpenMPIRBuilder.
Definition at line 2566 of file OpenMPToLLVMIRTranslation.cpp.
References allocatePrivateVars(), allocReductionVars(), checkImplementationStatus(), cleanupPrivateVars(), collectReductionDecls(), convertOmpOpRegions(), copyFirstPrivateVars(), createReductionsAndCleanup(), findAllocaInsertPoint(), findCurrentLoopInfo(), getIsByRef(), mlir::LLVM::ModuleTranslation::getOpenMPBuilder(), mlir::Operation::getParentOp(), handleError(), initPrivateVars(), PrivateVarsInfo::llvmVars, mlir::LLVM::ModuleTranslation::lookupValue(), PrivateVarsInfo::mlirVars, popCancelFinalizationCB(), PrivateVarsInfo::privatizers, and pushCancelFinalizationCB().
Referenced by convertHostOrTargetOperation().
|
static |
Convert Order attribute to llvm::omp::OrderKind.
Definition at line 2964 of file OpenMPToLLVMIRTranslation.cpp.
Referenced by convertOmpSimd().
|
static |
Definition at line 6471 of file OpenMPToLLVMIRTranslation.cpp.
References mlir::LLVM::ModuleTranslation::convertType(), mlir::LLVM::ModuleTranslation::getLLVMModule(), getOmpTargetAlloc(), mlir::LLVM::ModuleTranslation::lookupValue(), mlir::LLVM::ModuleTranslation::mapValue(), and success().
Referenced by convertHostOrTargetOperation().
|
static |
Definition at line 6732 of file OpenMPToLLVMIRTranslation.cpp.
References convertHostOrTargetOperation().
|
static |
Definition at line 6515 of file OpenMPToLLVMIRTranslation.cpp.
References mlir::LLVM::ModuleTranslation::getLLVMModule(), getOmpTargetFree(), mlir::LLVM::ModuleTranslation::lookupValue(), and success().
Referenced by convertHostOrTargetOperation().
|
static |
Definition at line 6738 of file OpenMPToLLVMIRTranslation.cpp.
References mlir::WalkResult::advance(), convertOmpOpRegions(), convertOmpTarget(), convertOmpTargetData(), mlir::LLVM::ModuleTranslation::convertType(), forwardArgs(), handleError(), mlir::WalkResult::interrupt(), mlir::LLVM::ModuleTranslation::lookupValue(), mlir::LLVM::ModuleTranslation::mapValue(), mlir::PreOrder, result, mlir::WalkResult::skip(), and mlir::Operation::walk().
|
static |
Definition at line 3809 of file OpenMPToLLVMIRTranslation.cpp.
Referenced by convertDeclareTargetAttr().
|
static |
Definition at line 3793 of file OpenMPToLLVMIRTranslation.cpp.
Referenced by convertDeclareTargetAttr().
|
static |
Definition at line 1735 of file OpenMPToLLVMIRTranslation.cpp.
References findAssociatedValue(), mlir::LLVM::ModuleTranslation::forgetMapping(), mlir::LLVM::ModuleTranslation::getOpenMPBuilder(), handleError(), inlineConvertOmpRegions(), mlir::LLVM::ModuleTranslation::mapValue(), opIsInSingleThread(), setInsertPointForPossiblyEmptyBlock(), and success().
Referenced by convertOmpDistribute(), convertOmpParallel(), convertOmpTarget(), convertOmpTaskOp(), and convertOmpWsloop().
|
static |
Definition at line 4860 of file OpenMPToLLVMIRTranslation.cpp.
References calculateBoundsOffset(), checkIfPointerMap(), findAllocaInsertPoint(), and mlir::LLVM::ModuleTranslation::getOpenMPBuilder().
Referenced by genMapInfos().
|
static |
Definition at line 5603 of file OpenMPToLLVMIRTranslation.cpp.
References mlir::LLVM::TypeToLLVMIRTranslator::getPreferredAlignment().
Referenced by convertOmpTarget().
|
static |
Definition at line 1464 of file OpenMPToLLVMIRTranslation.cpp.
References mlir::LLVM::ModuleTranslation::getOpenMPBuilder(), handleError(), inlineOmpRegionCleanup(), owningReductionGens, and success().
Referenced by convertOmpDistribute(), convertOmpSections(), convertOmpTeams(), and convertOmpWsloop().
|
static |
Definition at line 4996 of file OpenMPToLLVMIRTranslation.cpp.
References collectMapDataFromMapOperands(), mlir::LLVM::ModuleTranslation::convertBlock(), mlir::LLVM::ModuleTranslation::convertType(), mlir::LLVM::ModuleTranslation::forgetMapping(), genMapInfos(), mlir::LLVM::ModuleTranslation::getOpenMPBuilder(), getOrCreateUserDefinedMapperFunc(), mlir::LLVM::ModuleTranslation::mapBlock(), mlir::LLVM::ModuleTranslation::mapFunction(), and mlir::LLVM::ModuleTranslation::mapValue().
Referenced by getOrCreateUserDefinedMapperFunc().
|
static |
Definition at line 3481 of file OpenMPToLLVMIRTranslation.cpp.
Referenced by convertOmpAtomicCapture(), and convertOmpAtomicUpdate().
If the given value is defined by an llvm.mlir.constant operation and it is of an integer type, return its value.
Definition at line 5777 of file OpenMPToLLVMIRTranslation.cpp.
References mlir::Value::getDefiningOp().
Referenced by initTargetDefaultAttrs().
|
static |
Follow uses of host_eval-defined block arguments of the given omp.target operation and populate output variables with their corresponding host value (i.e. operand evaluated outside of the target region), based on their uses inside of the target region.
Loop bounds and steps are only optionally populated, if output vectors are provided.
Definition at line 5698 of file OpenMPToLLVMIRTranslation.cpp.
References mlir::Operation::getUsers().
Referenced by initTargetDefaultAttrs(), and initTargetRuntimeAttrs().
|
static |
Find the insertion point for allocas given the current insertion point for normal operations in the builder.
Definition at line 500 of file OpenMPToLLVMIRTranslation.cpp.
References mlir::WalkResult::interrupt(), mlir::LLVM::ModuleTranslation::stackWalk(), and mlir::WalkResult::wasInterrupted().
Referenced by convertOmpAtomicCapture(), convertOmpAtomicRead(), convertOmpAtomicUpdate(), convertOmpAtomicWrite(), convertOmpDistribute(), convertOmpOrdered(), convertOmpParallel(), convertOmpSections(), convertOmpSimd(), convertOmpTarget(), convertOmpTargetData(), convertOmpTaskgroupOp(), convertOmpTaskOp(), convertOmpTeams(), convertOmpWsloop(), and createAlteredByCaptureMap().
|
static |
Return the llvm::Value * corresponding to the privateVar that is being privatized. It isn't always as simple as looking up moduleTranslation with privateVar. For instance, in case of an allocatable, the descriptor for the allocatable is privatized. This descriptor is mapped using an MapInfoOp. So, this function will return a pointer to the llvm::Value corresponding to the block argument for the mapped descriptor.
Definition at line 1566 of file OpenMPToLLVMIRTranslation.cpp.
References mlir::LLVM::ModuleTranslation::convertType(), mlir::Value::getType(), and mlir::LLVM::ModuleTranslation::lookupValue().
Referenced by copyFirstPrivateVars(), and initPrivateVar().
|
static |
Find the loop information structure for the loop nest being translated.
It will return a null value unless called from the translation function for a loop wrapper operation after successfully translating its body.
Definition at line 548 of file OpenMPToLLVMIRTranslation.cpp.
References mlir::WalkResult::interrupt(), and mlir::LLVM::ModuleTranslation::stackWalk().
Referenced by convertOmpDistribute(), convertOmpSimd(), and convertOmpWsloop().
|
static |
Looks up from the operation from and returns the PrivateClauseOp with name symbolName.
Definition at line 302 of file OpenMPToLLVMIRTranslation.cpp.
References mlir::SymbolTable::lookupNearestSymbolFrom().
Referenced by convertOmpTarget().
|
static |
Maps block arguments from blockArgIface (which are MLIR values) to the corresponding LLVM values of the interface's operands.
This is useful when an OpenMP region with entry block arguments is converted to LLVM. In this case the block arguments are (part of) of the OpenMP region's entry arguments and the operands are (part of) of the operands to the OpenMP op containing the region.
Definition at line 707 of file OpenMPToLLVMIRTranslation.cpp.
References mlir::LLVM::ModuleTranslation::lookupValue(), and mlir::LLVM::ModuleTranslation::mapValue().
Referenced by convertTargetOpsInNest().
|
static |
Definition at line 4927 of file OpenMPToLLVMIRTranslation.cpp.
References createAlteredByCaptureMap(), mlir::LLVM::ModuleTranslation::getOpenMPBuilder(), processIndividualMap(), and processMapWithMembersOf().
Referenced by convertOmpTarget(), convertOmpTargetData(), and emitUserDefinedMapper().
|
static |
Definition at line 3979 of file OpenMPToLLVMIRTranslation.cpp.
References getArrayElementSizeInBits(), and mlir::DataLayout::getTypeSizeInBits().
Referenced by getArrayElementSizeInBits(), and getSizeInBytes().
|
static |
Definition at line 4419 of file OpenMPToLLVMIRTranslation.cpp.
References ArrayAttr().
Referenced by getOverlappedMembers().
|
static |
Definition at line 3836 of file OpenMPToLLVMIRTranslation.cpp.
References mlir::SymbolTable::Private.
Referenced by getRefPtrIfDeclareTarget().
|
static |
Definition at line 4329 of file OpenMPToLLVMIRTranslation.cpp.
References ArrayAttr(), indices, and sortMapIndices().
Referenced by mapParentWithMembers().
Definition at line 3824 of file OpenMPToLLVMIRTranslation.cpp.
References mlir::Value::getDefiningOp(), and mlir::Operation::getOperand().
Referenced by getRefPtrIfDeclareTarget(), isDeclareTargetLink(), and isDeclareTargetTo().
Definition at line 1525 of file OpenMPToLLVMIRTranslation.cpp.
Referenced by convertOmpDistribute(), convertOmpParallel(), convertOmpSections(), convertOmpSimd(), convertOmpTeams(), and convertOmpWsloop().
|
static |
Definition at line 4274 of file OpenMPToLLVMIRTranslation.cpp.
Referenced by mapParentWithMembers(), processMapMembersWithParent(), and processMapWithMembersOf().
|
static |
Definition at line 6458 of file OpenMPToLLVMIRTranslation.cpp.
Referenced by convertTargetAllocMemOp().
|
static |
Definition at line 6502 of file OpenMPToLLVMIRTranslation.cpp.
Referenced by convertTargetFreeMemOp().
|
static |
Definition at line 4978 of file OpenMPToLLVMIRTranslation.cpp.
References emitUserDefinedMapper(), mlir::LLVM::ModuleTranslation::getOpenMPBuilder(), and mlir::LLVM::ModuleTranslation::lookupFunction().
Referenced by convertOmpTarget(), convertOmpTargetData(), and emitUserDefinedMapper().
|
static |
Definition at line 4428 of file OpenMPToLLVMIRTranslation.cpp.
References ArrayAttr(), b, and getAsIntegers().
Referenced by mapParentWithMembers().
|
static |
Convert ProcBindKind from MLIR-generated enum to LLVM enum.
Definition at line 687 of file OpenMPToLLVMIRTranslation.cpp.
Referenced by convertOmpParallel().
|
static |
Definition at line 5795 of file OpenMPToLLVMIRTranslation.cpp.
References collectReductionDecls(), mlir::Operation::getContext(), mlir::Operation::getParentOfType(), and getTypeByteSize().
Referenced by initTargetDefaultAttrs().
|
static |
Definition at line 3883 of file OpenMPToLLVMIRTranslation.cpp.
References getDeclareTargetRefPtrSuffix(), getGlobalOpFromValue(), mlir::LLVM::ModuleTranslation::getLLVMModule(), and mlir::LLVM::ModuleTranslation::getOpenMPBuilder().
|
static |
Definition at line 3997 of file OpenMPToLLVMIRTranslation.cpp.
References getArrayElementSizeInBits(), mlir::DataLayout::getTypeSizeInBits(), and mlir::LLVM::ModuleTranslation::lookupValue().
|
static |
Definition at line 5484 of file OpenMPToLLVMIRTranslation.cpp.
References getDevice().
Referenced by convertOmpTarget().
|
static |
Definition at line 5788 of file OpenMPToLLVMIRTranslation.cpp.
References mlir::DataLayout::getTypeSizeInBits().
Referenced by getReductionDataSize().
|
static |
Definition at line 5506 of file OpenMPToLLVMIRTranslation.cpp.
References mlir::LLVM::ModuleTranslation::getOpenMPBuilder(), and isDeclareTargetLink().
Referenced by convertOmpTarget().
|
static |
Definition at line 476 of file OpenMPToLLVMIRTranslation.cpp.
References mlir::Operation::emitError(), result, and success().
Referenced by convertHostOrTargetOperation(), convertOmpAtomicCapture(), convertOmpAtomicUpdate(), convertOmpCancel(), convertOmpCancellationPoint(), convertOmpCritical(), convertOmpDistribute(), convertOmpLoopNest(), convertOmpMasked(), convertOmpMaster(), convertOmpOrderedRegion(), convertOmpParallel(), convertOmpSections(), convertOmpSimd(), convertOmpSingle(), convertOmpTarget(), convertOmpTargetData(), convertOmpTaskgroupOp(), convertOmpTaskOp(), convertOmpTeams(), convertOmpWsloop(), convertTargetOpsInNest(), copyFirstPrivateVars(), createReductionsAndCleanup(), handleError(), and inlineConvertOmpRegions().
|
static |
Definition at line 490 of file OpenMPToLLVMIRTranslation.cpp.
References handleError(), result, and success().
|
static |
Initialize a single (first)private variable. You probably want to use allocateAndInitPrivateVars instead of this. This returns the private variable which has been initialized. This variable should be mapped before constructing the body of the Op.
Definition at line 1597 of file OpenMPToLLVMIRTranslation.cpp.
References mlir::Region::empty(), findAssociatedValue(), mlir::LLVM::ModuleTranslation::forgetMapping(), inlineConvertOmpRegions(), and mlir::LLVM::ModuleTranslation::mapValue().
Referenced by convertOmpTaskOp(), and initPrivateVars().
|
static |
Definition at line 1634 of file OpenMPToLLVMIRTranslation.cpp.
References PrivateVarsInfo::blockArgs, initPrivateVar(), PrivateVarsInfo::llvmVars, mlir::LLVM::ModuleTranslation::mapValue(), PrivateVarsInfo::mlirVars, PrivateVarsInfo::privatizers, and setInsertPointForPossiblyEmptyBlock().
Referenced by convertOmpDistribute(), convertOmpParallel(), convertOmpSimd(), convertOmpTarget(), and convertOmpWsloop().
|
static |
Populate default MinTeams, MaxTeams and MaxThreads to their default values as stated by the corresponding clauses, if constant.
These default values must be set before the creation of the outlined LLVM function for the target region, so that they can be used to initialize the corresponding global ConfigurationEnvironmentTy structure.
Definition at line 5820 of file OpenMPToLLVMIRTranslation.cpp.
References castOrGetParentOfType(), extractConstInteger(), extractHostEvalClauses(), getReductionDataSize(), and result.
Referenced by convertOmpTarget().
|
static |
Gather LLVM runtime values for all clauses evaluated in the host that are passed to the kernel invocation.
This function must be called only when compiling for the host. Also, it will only provide correct results if it's called after the body of targetOp has been fully generated.
Definition at line 5946 of file OpenMPToLLVMIRTranslation.cpp.
References castOrGetParentOfType(), extractHostEvalClauses(), mlir::LLVM::ModuleTranslation::getOpenMPBuilder(), and mlir::LLVM::ModuleTranslation::lookupValue().
Referenced by convertOmpTarget().
|
static |
Translates the blocks contained in the given region and appends them to at the current insertion point of builder.
The operations of the entry block are appended to the current insertion block. If set, continuationBlockArgs is populated with translated values that correspond to the values omp.yield'ed from the region.
Definition at line 902 of file OpenMPToLLVMIRTranslation.cpp.
References mlir::Block::back(), mlir::LLVM::ModuleTranslation::convertBlock(), convertOmpOpRegions(), mlir::Region::empty(), mlir::LLVM::ModuleTranslation::forgetMapping(), mlir::Region::front(), mlir::Operation::getOperands(), mlir::Region::getParentOp(), handleError(), mlir::Region::hasOneBlock(), mlir::LLVM::ModuleTranslation::lookupValues(), mlir::LLVM::ModuleTranslation::mapBlock(), nullptr, and success().
Referenced by allocReductionVars(), convertOmpTargetData(), copyFirstPrivateVars(), initPrivateVar(), inlineOmpRegionCleanup(), makeAtomicReductionGen(), makeReductionGen(), and makeRefDataPtrGen().
|
static |
handling of DeclareReductionOp's cleanup region
Definition at line 1425 of file OpenMPToLLVMIRTranslation.cpp.
References mlir::LLVM::ModuleTranslation::convertType(), mlir::LLVM::ModuleTranslation::forgetMapping(), mlir::Block::front(), mlir::Block::getArgument(), mlir::Value::getType(), inlineConvertOmpRegions(), mlir::LLVM::ModuleTranslation::mapValue(), nullptr, and success().
Referenced by cleanupPrivateVars(), convertOmpParallel(), convertOmpSimd(), convertOmpTarget(), and createReductionsAndCleanup().
Definition at line 3857 of file OpenMPToLLVMIRTranslation.cpp.
References getGlobalOpFromValue().
Referenced by checkIfPointerMap(), and handleDeclareTargetMapVar().
Definition at line 3867 of file OpenMPToLLVMIRTranslation.cpp.
References getGlobalOpFromValue().
Referenced by processMapMembersWithParent().
Definition at line 6429 of file OpenMPToLLVMIRTranslation.cpp.
References mlir::Operation::getParentOfType().
|
static |
Create an OpenMPIRBuilder-compatible atomic reduction generator for the given reduction declaration.
The generator uses builder but ignores its insertion point. Returns null if there is no atomic region available in the reduction declaration.
Definition at line 1015 of file OpenMPToLLVMIRTranslation.cpp.
References atomicGen, inlineConvertOmpRegions(), lhs, mlir::LLVM::ModuleTranslation::mapValue(), and rhs.
|
static |
Create an OpenMPIRBuilder-compatible reduction generator for the given reduction declaration.
The generator uses builder but ignores its insertion point.
Definition at line 985 of file OpenMPToLLVMIRTranslation.cpp.
References inlineConvertOmpRegions(), lhs, mlir::LLVM::ModuleTranslation::mapValue(), result, and rhs.
Referenced by convertOmpSimd().
|
static |
Create an OpenMPIRBuilder-compatible data_ptr_ptr reduction generator for the given reduction declaration.
The generator uses builder but ignores its insertion point. Returns null if there is no data_ptr_ptr region available in the reduction declaration.
Definition at line 1048 of file OpenMPToLLVMIRTranslation.cpp.
References inlineConvertOmpRegions(), mlir::LLVM::ModuleTranslation::mapValue(), and result.
|
static |
Map input arguments to reduction initialization region.
Definition at line 1224 of file OpenMPToLLVMIRTranslation.cpp.
References mlir::LLVM::ModuleTranslation::convertType(), mlir::Region::front(), mlir::Block::getNumArguments(), mlir::Value::getType(), mlir::LLVM::ModuleTranslation::lookupValue(), and mlir::LLVM::ModuleTranslation::mapValue().
|
static |
Definition at line 4514 of file OpenMPToLLVMIRTranslation.cpp.
References checkIfPointerMap(), mlir::LLVM::createMappingInformation(), getFirstOrLastMappedMemberPtr(), getMapDataMemberIdx(), getOverlappedMembers(), and sortMapIndices().
Referenced by processMapWithMembersOf().
|
static |
This can't always be determined statically, but when we can, it is good to avoid generating compiler-added barriers which will deadlock the program.
Definition at line 1717 of file OpenMPToLLVMIRTranslation.cpp.
References mlir::Operation::getParentOp().
Referenced by copyFirstPrivateVars().
|
static |
If we cancelled the construct, we should branch to the finalization block of that construct. OMPIRBuilder structures the CFG such that the cleanup block is immediately before the continuation block. Now this finalization has been created we can fix the branch.
Definition at line 2169 of file OpenMPToLLVMIRTranslation.cpp.
Referenced by convertOmpTaskOp(), and convertOmpWsloop().
|
static |
Definition at line 4773 of file OpenMPToLLVMIRTranslation.cpp.
References checkIfPointerMap().
Referenced by genMapInfos(), and processMapWithMembersOf().
|
static |
Definition at line 4690 of file OpenMPToLLVMIRTranslation.cpp.
References checkIfPointerMap(), convertClauseMapFlags(), mlir::LLVM::createMappingInformation(), mlir::LLVM::ModuleTranslation::getLLVMModule(), getMapDataMemberIdx(), and isDeclareTargetTo().
Referenced by processMapWithMembersOf().
|
static |
Definition at line 4812 of file OpenMPToLLVMIRTranslation.cpp.
References getMapDataMemberIdx(), mapParentWithMembers(), processIndividualMap(), and processMapMembersWithParent().
Referenced by genMapInfos().
|
static |
Shared implementation of a callback which adds a termiator for the new block created for the branch taken when an openmp construct is cancelled. The terminator is saved in cancelTerminators. This callback is invoked only if there is cancellation inside of the taskgroup body. The terminator will need to be fixed to branch to the correct block to cleanup the construct.
Definition at line 2139 of file OpenMPToLLVMIRTranslation.cpp.
References constructIsCancellable().
Referenced by convertOmpTaskOp(), and convertOmpWsloop().
|
static |
Definition at line 1256 of file OpenMPToLLVMIRTranslation.cpp.
Referenced by convertOmpTaskOp(), copyFirstPrivateVars(), and initPrivateVars().
|
static |
Definition at line 4281 of file OpenMPToLLVMIRTranslation.cpp.
References ArrayAttr(), b, if(), and indices.
Referenced by getFirstOrLastMappedMemberPtr(), and mapParentWithMembers().
|
static |
Definition at line 1983 of file OpenMPToLLVMIRTranslation.cpp.
References mlir::Operation::erase().
Referenced by convertOmpDistribute(), and convertOmpTeams().
| atomicGen |
Definition at line 1413 of file OpenMPToLLVMIRTranslation.cpp.
Referenced by makeAtomicReductionGen().
| nullptr |
Definition at line 1413 of file OpenMPToLLVMIRTranslation.cpp.
Referenced by mlir::detail::AttrOpBinder< AttrT >::AttrOpBinder(), mlir::spirv::BlockMergeInfo::BlockMergeInfo(), mlir::BlockRange::BlockRange(), mlir::CallGraph::CallGraph(), mlir::sparse_tensor::CodegenEnv::CodegenEnv(), mlir::detail::constant_op_binder< AttrT >::constant_op_binder(), mlir::AsmParser::CyclicParseReset::CyclicParseReset(), mlir::AsmPrinter::CyclicPrintReset::CyclicPrintReset(), DynamicMemRefType< T >::DynamicMemRefType(), DynamicMemRefType< T >::DynamicMemRefType(), mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyMlirContext::ErrorCapture::ErrorCapture(), executeGetOperandsResults(), mlir::ExecutionEngine::ExecutionEngine(), findPayloadRoot(), mlir::AsmParserState::getAttributeAliasDef(), mlir::AsmParserState::getBlockDef(), mlir::detail::DialectInterfaceCollectionBase::getInterfaceFor(), mlir::Liveness::getLiveness(), mlir::PassExecutionAction::getOp(), mlir::AsmParserState::getOpDef(), mlir::AsmParserState::getTypeAliasDef(), inlineConvertOmpRegions(), inlineOmpRegionCleanup(), mlir::detail::Interface< ConcreteType, Attribute, Traits, Attribute, AttributeTrait::TraitBase >::Interface(), mlir::detail::Interface< ConcreteType, Attribute, Traits, Attribute, AttributeTrait::TraitBase >::Interface(), mlir::detail::Interface< ConcreteType, Attribute, Traits, Attribute, AttributeTrait::TraitBase >::Interface(), mlir::detail::Interface< ConcreteType, Attribute, Traits, Attribute, AttributeTrait::TraitBase >::Interface(), mlir::Lexer::Lexer(), mlir::pdll::Lexer::Lexer(), mlir::sparse_tensor::LoopEmitter::locateLvlAtAffineAddress(), mlir::PassInfo::lookup(), mlir::PassPipelineInfo::lookup(), mlir::pdll::ods::Context::lookupDialect(), mlir::CallGraph::lookupNode(), makeArrayAttr(), makeDenseBoolArrayAttr(), makeDenseI64ArrayAttr(), mlir::affine::NestedPattern::NestedPattern(), mlir::Op< ConcreteType, Traits >::Op(), mlir::Op< ConcreteType, Traits >::Op(), mlir::OwningOpRef< OpTy >::OwningOpRef(), mlir::Pattern::Pattern(), mlir::ReductionNode::ReductionNode(), mlir::ShapedTypeComponents::ShapedTypeComponents(), mlir::ShapedTypeComponents::ShapedTypeComponents(), mlir::ShapedTypeComponents::ShapedTypeComponents(), mlir::ShapedTypeComponents::ShapedTypeComponents(), mlir::sparse_tensor::SparseIterator::SparseIterator(), mlir::detail::StringAttrStorage::StringAttrStorage(), mlir::spirv::detail::StructTypeStorage::StructTypeStorage(), mlir::pdl_to_pdl_interp::SuccessNode::SuccessNode(), and mlir::SuccessorRange::SuccessorRange().
| owningDataPtrPtrReductionGens[i] |
Definition at line 1414 of file OpenMPToLLVMIRTranslation.cpp.
| owningReductionGens[i] |
Definition at line 1412 of file OpenMPToLLVMIRTranslation.cpp.
Referenced by convertOmpParallel(), and createReductionsAndCleanup().