MLIR
24.0.0git
include
mlir
Dialect
OpenACC
OpenACCOpsInterfaces.h
Go to the documentation of this file.
1
//===- OpenACCOpsInterfaces.h - OpenACC op interfaces -----------*- 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 holds C++ types used by OpenACC operation interface signatures
10
// and includes the generated interface declarations. StoreLikeOpInterface
11
// uses the stored-value types defined here. Types for another interface go
12
// in this file as well, above the generated include.
13
//
14
//===----------------------------------------------------------------------===//
15
16
#ifndef MLIR_DIALECT_OPENACC_OPENACCOPSINTERFACES_H
17
#define MLIR_DIALECT_OPENACC_OPENACCOPSINTERFACES_H
18
19
#include "
mlir/IR/BuiltinAttributes.h
"
20
#include "
mlir/IR/OpDefinition.h
"
21
#include "
mlir/IR/SymbolTable.h
"
22
#include "
mlir/Interfaces/SideEffectInterfaces.h
"
23
#include "llvm/ADT/BitmaskEnum.h"
24
#include "llvm/ADT/SmallVector.h"
25
26
namespace
mlir
{
27
class
OpOperand
;
28
29
namespace
acc
{
30
LLVM_ENABLE_BITMASK_ENUMS_IN_NAMESPACE
();
31
32
/// Where the stored bits come from. `Contents` is one dereference, so
33
/// `Operand | Contents` is the memory identified by an operand and
34
/// `Symbol | Contents` is the data of a symbol. `Symbol` alone is the
35
/// symbol's address.
36
enum class
StoredSourceKind
: uint8_t {
37
Unknown
= 0,
// a source this operation cannot name
38
Operand
= 1 << 0,
// the SSA value of an operand, e.g. fir.store
39
Contents
= 1 << 1,
// one dereference of Operand or Symbol
40
Symbol
= 1 << 2,
// a symbol's address
41
LLVM_MARK_AS_BITMASK_ENUM(
Symbol
)
42
};
43
44
struct
StoredSource
{
45
StoredSourceKind
kind
=
StoredSourceKind::Unknown
;
46
OpOperand
*
operand
=
nullptr
;
// set when Operand is set
47
SymbolRefAttr
symbol
= {};
// set when Symbol is set
48
};
49
50
/// Null destination means an unknown place.
51
struct
StoreLocation
{
52
OpOperand
*
destination
=
nullptr
;
53
};
54
55
struct
StoredValue
{
56
StoredSource
source
;
57
llvm::SmallVector<StoreLocation, 1>
locations
;
58
};
59
}
// namespace acc
60
}
// namespace mlir
61
62
#include "mlir/Dialect/OpenACC/OpenACCOpsInterfaces.h.inc"
63
64
#endif
// MLIR_DIALECT_OPENACC_OPENACCOPSINTERFACES_H
OpDefinition.h
SideEffectInterfaces.h
SymbolTable.h
llvm::SmallVector
Definition
LLVM.h:67
mlir::OpOperand
This class represents an operand of an operation.
Definition
Value.h:256
BuiltinAttributes.h
mlir::acc
Definition
ACCDataRuntime.h:32
mlir::acc::StoredSourceKind
StoredSourceKind
Where the stored bits come from.
Definition
OpenACCOpsInterfaces.h:36
mlir::acc::StoredSourceKind::Symbol
@ Symbol
Definition
OpenACCOpsInterfaces.h:40
mlir::acc::StoredSourceKind::Operand
@ Operand
Definition
OpenACCOpsInterfaces.h:38
mlir::acc::StoredSourceKind::Unknown
@ Unknown
Definition
OpenACCOpsInterfaces.h:37
mlir::acc::StoredSourceKind::Contents
@ Contents
Definition
OpenACCOpsInterfaces.h:39
mlir::acc::LLVM_ENABLE_BITMASK_ENUMS_IN_NAMESPACE
LLVM_ENABLE_BITMASK_ENUMS_IN_NAMESPACE()
mlir
Include the generated interface declarations.
Definition
ABIRewriteContext.h:32
mlir::acc::StoreLocation
Null destination means an unknown place.
Definition
OpenACCOpsInterfaces.h:51
mlir::acc::StoreLocation::destination
OpOperand * destination
Definition
OpenACCOpsInterfaces.h:52
mlir::acc::StoredSource
Definition
OpenACCOpsInterfaces.h:44
mlir::acc::StoredSource::kind
StoredSourceKind kind
Definition
OpenACCOpsInterfaces.h:45
mlir::acc::StoredSource::symbol
SymbolRefAttr symbol
Definition
OpenACCOpsInterfaces.h:47
mlir::acc::StoredSource::operand
OpOperand * operand
Definition
OpenACCOpsInterfaces.h:46
mlir::acc::StoredValue
Definition
OpenACCOpsInterfaces.h:55
mlir::acc::StoredValue::source
StoredSource source
Definition
OpenACCOpsInterfaces.h:56
mlir::acc::StoredValue::locations
llvm::SmallVector< StoreLocation, 1 > locations
Definition
OpenACCOpsInterfaces.h:57
Generated on
for MLIR by
1.14.0