LLVM 24.0.0git
llvm::OpenMPIRBuilder::MapInfosTy::DynamicSegment Struct Reference

Represents a group of mapper sub-components produced by an iterator modifier on a declare mapper's map clause: the component count is only known at runtime, so these are pushed one at a time via __tgt_push_mapper_component from inside a generated loop, rather than being added to the arrays above. More...

#include "llvm/Frontend/OpenMP/OMPIRBuilder.h"

Public Attributes

Value * Count = nullptr
 Runtime (i64) trip count for this segment.
std::function< Expected< SmallVector< Value *, 3 > >(IRBuilderBase &, Value *)> GenEntry
 Emits the code computing one iteration's (BasePointer, Pointer, Size) triple, given the loop's linear induction variable (0-based, i64).
omp::OpenMPOffloadMappingFlags Type
 Map type/HasAttachPtr, constant across the segment.
bool HasAttachPtr = false
Function * ChildMapperFn = nullptr
 User-defined mapper to invoke for this segment's component, if the underlying map clause carries one (mirrors CustomMapperCB for the statically-known components above).

Detailed Description

Represents a group of mapper sub-components produced by an iterator modifier on a declare mapper's map clause: the component count is only known at runtime, so these are pushed one at a time via __tgt_push_mapper_component from inside a generated loop, rather than being added to the arrays above.

Only consumed by emitUserDefinedMapper; emitOffloadingArrays ignores this field.

Definition at line 3108 of file OMPIRBuilder.h.

Member Data Documentation

◆ ChildMapperFn

Function* llvm::OpenMPIRBuilder::MapInfosTy::DynamicSegment::ChildMapperFn = nullptr

User-defined mapper to invoke for this segment's component, if the underlying map clause carries one (mirrors CustomMapperCB for the statically-known components above).

Definition at line 3126 of file OMPIRBuilder.h.

Referenced by llvm::OpenMPIRBuilder::emitUserDefinedMapper().

◆ Count

Value* llvm::OpenMPIRBuilder::MapInfosTy::DynamicSegment::Count = nullptr

Runtime (i64) trip count for this segment.

Definition at line 3110 of file OMPIRBuilder.h.

Referenced by llvm::OpenMPIRBuilder::emitUserDefinedMapper().

◆ GenEntry

std::function<Expected<SmallVector<Value *, 3> >(IRBuilderBase &, Value *)> llvm::OpenMPIRBuilder::MapInfosTy::DynamicSegment::GenEntry

Emits the code computing one iteration's (BasePointer, Pointer, Size) triple, given the loop's linear induction variable (0-based, i64).

Owning (not function_ref): the callable is typically a lambda temporary assigned in after construction, which would otherwise dangle by the time this is invoked. Returns an Error if the entry could not be computed, e.g. on region conversion failure.

Definition at line 3118 of file OMPIRBuilder.h.

Referenced by llvm::OpenMPIRBuilder::emitUserDefinedMapper().

◆ HasAttachPtr

bool llvm::OpenMPIRBuilder::MapInfosTy::DynamicSegment::HasAttachPtr = false

Definition at line 3122 of file OMPIRBuilder.h.

Referenced by llvm::OpenMPIRBuilder::emitUserDefinedMapper().

◆ Type

omp::OpenMPOffloadMappingFlags llvm::OpenMPIRBuilder::MapInfosTy::DynamicSegment::Type
Initial value:

Map type/HasAttachPtr, constant across the segment.

Definition at line 3120 of file OMPIRBuilder.h.

Referenced by llvm::OpenMPIRBuilder::emitUserDefinedMapper().


The documentation for this struct was generated from the following file: