13#ifndef FORTRAN_OPTIMIZER_DIALECT_FIRATTR_H
14#define FORTRAN_OPTIMIZER_DIALECT_FIRATTR_H
16#include "mlir/Dialect/OpenACC/OpenACCVariableInfo.h"
17#include "mlir/IR/BuiltinAttributes.h"
20class DialectAsmParser;
21class DialectAsmPrinter;
33using KindTy = unsigned;
36 :
public mlir::Attribute::AttrBase<ExactTypeAttr, mlir::Attribute,
37 detail::TypeAttributeStorage> {
40 using ValueType = mlir::Type;
42 static constexpr llvm::StringLiteral name =
"fir.type_is";
43 static constexpr llvm::StringRef getAttrName() {
return "type_is"; }
46 mlir::Type getType()
const;
50 :
public mlir::Attribute::AttrBase<SubclassAttr, mlir::Attribute,
51 detail::TypeAttributeStorage> {
54 using ValueType = mlir::Type;
56 static constexpr llvm::StringLiteral name =
"fir.class_is";
57 static constexpr llvm::StringRef getAttrName() {
return "class_is"; }
60 mlir::Type getType()
const;
67 using BoolAttr::BoolAttr;
69 static constexpr llvm::StringLiteral name =
"fir.must_be_heap";
70 static constexpr llvm::StringRef getAttrName() {
return "fir.must_be_heap"; }
80 :
public mlir::Attribute::AttrBase<ClosedIntervalAttr, mlir::Attribute,
81 mlir::AttributeStorage> {
85 static constexpr llvm::StringLiteral name =
"fir.interval";
86 static constexpr llvm::StringRef getAttrName() {
return "interval"; }
95 :
public mlir::Attribute::AttrBase<UpperBoundAttr, mlir::Attribute,
96 mlir::AttributeStorage> {
100 static constexpr llvm::StringLiteral name =
"fir.upper";
101 static constexpr llvm::StringRef getAttrName() {
return "upper"; }
110 :
public mlir::Attribute::AttrBase<LowerBoundAttr, mlir::Attribute,
111 mlir::AttributeStorage> {
115 static constexpr llvm::StringLiteral name =
"fir.lower";
116 static constexpr llvm::StringRef getAttrName() {
return "lower"; }
125 :
public mlir::Attribute::AttrBase<PointIntervalAttr, mlir::Attribute,
126 mlir::AttributeStorage> {
130 static constexpr llvm::StringLiteral name =
"fir.point";
131 static constexpr llvm::StringRef getAttrName() {
return "point"; }
140 :
public mlir::Attribute::AttrBase<RealAttr, mlir::Attribute,
141 detail::RealAttributeStorage> {
144 using ValueType = std::pair<int, llvm::APFloat>;
146 static constexpr llvm::StringLiteral name =
"fir.real";
147 static constexpr llvm::StringRef getAttrName() {
return "real"; }
148 static RealAttr get(mlir::MLIRContext *ctxt,
const ValueType &key);
150 KindTy getFKind()
const;
151 llvm::APFloat getValue()
const;
154mlir::Attribute parseFirAttribute(FIROpsDialect *dialect,
155 mlir::DialectAsmParser &parser,
158void printFirAttribute(FIROpsDialect *dialect, mlir::Attribute attr,
159 mlir::DialectAsmPrinter &p);
163#include "flang/Optimizer/Dialect/FIREnumAttr.h.inc"
165#define GET_ATTRDEF_CLASSES
166#include "flang/Optimizer/Dialect/FIRAttr.h.inc"
168#include "flang/Optimizer/Dialect/SafeTempArrayCopyAttrInterface.h"
Definition AbstractConverter.h:37
Definition AbstractConverter.h:32
Definition FIRAttr.cpp:32
An attribute representing a reference to a type.
Definition FIRAttr.cpp:62