23 :
public mlir::acc::PointerLikeType::ExternalModel<
24 OpenACCPointerLikeModel<T>, T> {
25 mlir::Type getElementType(mlir::Type pointer)
const {
26 return mlir::cast<T>(pointer).getElementType();
28 mlir::acc::VariableTypeCategory
29 getPointeeTypeCategory(mlir::Type pointer,
30 mlir::TypedValue<mlir::acc::PointerLikeType> varPtr,
31 mlir::Type varType)
const;
33 mlir::Value genAllocate(mlir::Type pointer, mlir::OpBuilder &builder,
34 mlir::Location loc, llvm::StringRef varName,
35 mlir::Type varType, mlir::Value originalVar,
36 bool &needsFree)
const;
38 bool genFree(mlir::Type pointer, mlir::OpBuilder &builder, mlir::Location loc,
39 mlir::TypedValue<mlir::acc::PointerLikeType> varToFree,
40 mlir::Value allocRes, mlir::Type varType)
const;
42 bool genCopy(mlir::Type pointer, mlir::OpBuilder &builder, mlir::Location loc,
43 mlir::TypedValue<mlir::acc::PointerLikeType> destination,
44 mlir::TypedValue<mlir::acc::PointerLikeType> source,
45 mlir::Type varType)
const;
50 :
public mlir::acc::MappableType::ExternalModel<OpenACCMappableModel<T>,
52 mlir::TypedValue<mlir::acc::PointerLikeType> getVarPtr(::mlir::Type type,
53 mlir::Value var)
const;
55 std::optional<llvm::TypeSize>
56 getSizeInBytes(mlir::Type type, mlir::Value var, mlir::ValueRange accBounds,
57 const mlir::DataLayout &dataLayout)
const;
59 std::optional<int64_t>
60 getOffsetInBytes(mlir::Type type, mlir::Value var, mlir::ValueRange accBounds,
61 const mlir::DataLayout &dataLayout)
const;
63 bool hasUnknownDimensions(mlir::Type type)
const;
66 generateAccBounds(mlir::Type type, mlir::Value var,
67 mlir::OpBuilder &builder)
const;
69 mlir::acc::VariableTypeCategory getTypeCategory(mlir::Type type,
70 mlir::Value var)
const;
72 mlir::Value generatePrivateInit(mlir::Type type, mlir::OpBuilder &builder,
74 mlir::TypedValue<mlir::acc::MappableType> var,
75 llvm::StringRef varName,
76 mlir::ValueRange extents, mlir::Value initVal,
77 bool &needsDestroy)
const;
79 bool generatePrivateDestroy(mlir::Type type, mlir::OpBuilder &builder,
80 mlir::Location loc, mlir::Value privatized)
const;