FLANG
include
flang
Optimizer
OpenACC
Support
FIROpenACCOpsInterfaces.h
1
//===- FIROpenACCOpsInterfaces.h --------------------------------*- C++ -*-===//
2
//
3
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
// See https://llvm.org/LICENSE.txt for license information.
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
//
7
//===----------------------------------------------------------------------===//
8
//
9
// This file contains external operation interfaces for FIR.
10
//
11
//===----------------------------------------------------------------------===//
12
13
#ifndef FLANG_OPTIMIZER_OPENACC_FIROPENACC_OPS_INTERFACES_H_
14
#define FLANG_OPTIMIZER_OPENACC_FIROPENACC_OPS_INTERFACES_H_
15
16
#include "mlir/Dialect/OpenACC/OpenACC.h"
17
18
namespace
fir
{
19
class
DeclareOp;
20
}
// namespace fir
21
22
namespace
hlfir {
23
class
DeclareOp;
24
class
DesignateOp;
25
}
// namespace hlfir
26
27
namespace
fir::acc {
28
29
template
<
typename
Op>
30
struct
PartialEntityAccessModel
31
:
public
mlir::acc::PartialEntityAccessOpInterface::ExternalModel<
32
PartialEntityAccessModel<Op>, Op> {
33
mlir::Value getBaseEntity(mlir::Operation *op)
const
;
34
35
// Default implementation - returns false (partial view)
36
bool
isCompleteView(mlir::Operation *op)
const
{
return
false
; }
37
};
38
39
// Full specializations for declare operations
40
template
<>
41
struct
PartialEntityAccessModel
<
fir
::DeclareOp>
42
:
public
mlir::acc::PartialEntityAccessOpInterface::ExternalModel<
43
PartialEntityAccessModel<fir::DeclareOp>, fir::DeclareOp> {
44
mlir::Value getBaseEntity(mlir::Operation *op)
const
;
45
bool
isCompleteView(mlir::Operation *op)
const
;
46
};
47
48
template
<>
49
struct
PartialEntityAccessModel
<hlfir::DeclareOp>
50
:
public
mlir::acc::PartialEntityAccessOpInterface::ExternalModel<
51
PartialEntityAccessModel<hlfir::DeclareOp>, hlfir::DeclareOp> {
52
mlir::Value getBaseEntity(mlir::Operation *op)
const
;
53
bool
isCompleteView(mlir::Operation *op)
const
;
54
};
55
56
}
// namespace fir::acc
57
58
#endif
// FLANG_OPTIMIZER_OPENACC_FIROPENACC_OPS_INTERFACES_H_
fir
Definition
AbstractConverter.h:34
fir::acc::PartialEntityAccessModel
Definition
FIROpenACCOpsInterfaces.h:32
Generated on
for FLANG by
1.14.0