FLANG
FIRType.h
1//===-- Optimizer/Dialect/FIRType.h -- FIR types ----------------*- 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// Coding style: https://mlir.llvm.org/getting_started/DeveloperGuide/
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef FORTRAN_OPTIMIZER_DIALECT_FIRTYPE_H
14#define FORTRAN_OPTIMIZER_DIALECT_FIRTYPE_H
15
16#include "mlir/IR/BuiltinAttributes.h"
17#include "mlir/IR/BuiltinTypes.h"
18#include "mlir/Interfaces/DataLayoutInterfaces.h"
19#include "llvm/ADT/SmallVector.h"
20#include "llvm/IR/Type.h"
21
22namespace fir {
23class FIROpsDialect;
24class KindMapping;
25using KindTy = unsigned;
26
27namespace detail {
29} // namespace detail
30
31} // namespace fir
32
33//===----------------------------------------------------------------------===//
34// BaseBoxType
35//===----------------------------------------------------------------------===//
36
37namespace fir {
38
40class BaseBoxType : public mlir::Type {
41public:
42 using mlir::Type::Type;
43
45 enum class Attribute { None, Allocatable, Pointer };
46
48 mlir::Type getEleTy() const;
49
51 mlir::Type getBaseAddressType() const;
52
54 mlir::Type unwrapInnerType() const;
55
56 // Get the element type or the fir.array
57 mlir::Type getElementOrSequenceType() const;
58
60 bool isAssumedRank() const;
61
63 bool isPointer() const;
64
66 bool isPointerOrAllocatable() const;
67
69 bool isVolatile() const;
70
73 BaseBoxType getBoxTypeWithNewShape(mlir::Type shapeMold) const;
74 BaseBoxType getBoxTypeWithNewShape(int rank) const;
75
78
80 static bool classof(mlir::Type type);
81};
82
83} // namespace fir
84
85#define GET_TYPEDEF_CLASSES
86#include "flang/Optimizer/Dialect/FIROpsTypes.h.inc"
87
88namespace llvm {
89class raw_ostream;
90class StringRef;
91template <typename>
93class hash_code;
94} // namespace llvm
95
96namespace mlir {
97class DialectAsmParser;
98class DialectAsmPrinter;
99class ComplexType;
100class FloatType;
101class ValueRange;
102} // namespace mlir
103
104namespace fir {
105namespace detail {
106struct RecordTypeStorage;
107} // namespace detail
108
109// These isa_ routines follow the precedent of llvm::isa_or_null<>
110
112bool isa_fir_type(mlir::Type t);
113
115bool isa_std_type(mlir::Type t);
116
118bool isa_fir_or_std_type(mlir::Type t);
119
121inline bool isa_ref_type(mlir::Type t) {
122 return mlir::isa<fir::ReferenceType, fir::PointerType, fir::HeapType,
123 fir::LLVMPointerType>(t);
124}
125
127inline bool isa_box_type(mlir::Type t) {
128 return mlir::isa<fir::BaseBoxType, fir::BoxCharType, fir::BoxProcType>(t);
129}
130
134inline bool isa_passbyref_type(mlir::Type t) {
135 return mlir::isa<fir::ReferenceType, mlir::FunctionType>(t) ||
136 isa_box_type(t);
137}
138
142inline bool conformsWithPassByRef(mlir::Type t) {
143 return isa_ref_type(t) || isa_box_type(t) || mlir::isa<mlir::FunctionType>(t);
144}
145
147inline bool isa_derived(mlir::Type t) { return mlir::isa<fir::RecordType>(t); }
148
150inline bool isa_builtin_cptr_type(mlir::Type t) {
151 if (auto recTy = mlir::dyn_cast_or_null<fir::RecordType>(t))
152 return recTy.getName().ends_with("T__builtin_c_ptr") ||
153 recTy.getName().ends_with("T__builtin_c_funptr");
154 return false;
155}
156
157// Is `t` type(c_devptr)?
158inline bool isa_builtin_c_devptr_type(mlir::Type t) {
159 if (auto recTy = mlir::dyn_cast_or_null<fir::RecordType>(t))
160 return recTy.getName().ends_with("T__builtin_c_devptr");
161 return false;
162}
163
165inline bool isa_builtin_cdevptr_type(mlir::Type t) {
166 if (auto recTy = mlir::dyn_cast_or_null<fir::RecordType>(t))
167 return recTy.getName().ends_with("T__builtin_c_devptr");
168 return false;
169}
170
172inline bool isa_aggregate(mlir::Type t) {
173 return mlir::isa<SequenceType, mlir::TupleType>(t) || fir::isa_derived(t);
174}
175
178mlir::Type dyn_cast_ptrEleTy(mlir::Type t);
179
182mlir::Type dyn_cast_ptrOrBoxEleTy(mlir::Type t);
183
185inline bool isa_real(mlir::Type t) { return mlir::isa<mlir::FloatType>(t); }
186
188inline bool isa_integer(mlir::Type t) {
189 return mlir::isa<mlir::IndexType, mlir::IntegerType, fir::IntegerType>(t);
190}
191
193inline bool isa_vector(mlir::Type t) {
194 return mlir::isa<mlir::VectorType, fir::VectorType>(t);
195}
196
197mlir::Type parseFirType(FIROpsDialect *, mlir::DialectAsmParser &parser);
198
199void printFirType(FIROpsDialect *, mlir::Type ty, mlir::DialectAsmPrinter &p);
200
203void verifyIntegralType(mlir::Type type);
204
206inline bool isa_complex(mlir::Type t) {
207 return mlir::isa<mlir::ComplexType>(t) &&
208 mlir::isa<mlir::FloatType>(
209 mlir::cast<mlir::ComplexType>(t).getElementType());
210}
211
213inline bool isa_char(mlir::Type t) { return mlir::isa<fir::CharacterType>(t); }
214
217inline bool isa_trivial(mlir::Type t) {
218 return isa_integer(t) || isa_real(t) || isa_complex(t) || isa_vector(t) ||
219 mlir::isa<fir::LogicalType>(t);
220}
221
223inline bool isa_char_string(mlir::Type t) {
224 if (auto ct = mlir::dyn_cast_or_null<fir::CharacterType>(t))
225 return ct.getLen() != fir::CharacterType::singleton();
226 return false;
227}
228
234bool isa_unknown_size_box(mlir::Type t);
235
238bool isa_volatile_type(mlir::Type t);
239
241inline bool characterWithDynamicLen(mlir::Type t) {
242 if (auto charTy = mlir::dyn_cast<fir::CharacterType>(t))
243 return charTy.hasDynamicLen();
244 return false;
245}
246
249inline bool sequenceWithNonConstantShape(fir::SequenceType seqTy) {
250 return seqTy.hasUnknownShape() || seqTy.hasDynamicExtents();
251}
252
254bool hasDynamicSize(mlir::Type t);
255
256inline unsigned getRankOfShapeType(mlir::Type t) {
257 if (auto shTy = mlir::dyn_cast<fir::ShapeType>(t))
258 return shTy.getRank();
259 if (auto shTy = mlir::dyn_cast<fir::ShapeShiftType>(t))
260 return shTy.getRank();
261 if (auto shTy = mlir::dyn_cast<fir::ShiftType>(t))
262 return shTy.getRank();
263 return 0;
264}
265
267inline mlir::Type boxMemRefType(fir::BaseBoxType t) {
268 auto eleTy = t.getEleTy();
269 if (!mlir::isa<fir::PointerType, fir::HeapType>(eleTy))
270 eleTy = fir::ReferenceType::get(t);
271 return eleTy;
272}
273
275inline mlir::Type unwrapSequenceType(mlir::Type t) {
276 if (auto seqTy = mlir::dyn_cast<fir::SequenceType>(t))
277 return seqTy.getEleTy();
278 return t;
279}
280
282mlir::Type extractSequenceType(mlir::Type ty);
283
284inline mlir::Type unwrapRefType(mlir::Type t) {
285 if (auto eleTy = dyn_cast_ptrEleTy(t))
286 return eleTy;
287 return t;
288}
289
292inline mlir::Type unwrapPassByRefType(mlir::Type t) {
293 if (auto eleTy = dyn_cast_ptrOrBoxEleTy(t))
294 return eleTy;
295 return t;
296}
297
303mlir::Type getFortranElementType(mlir::Type ty);
304
312mlir::Type unwrapSeqOrBoxedSeqType(mlir::Type ty);
313
317mlir::Type unwrapAllRefAndSeqType(mlir::Type ty);
318
321inline fir::SequenceType unwrapUntilSeqType(mlir::Type t) {
322 while (true) {
323 if (!t)
324 return {};
325 if (auto ty = dyn_cast_ptrOrBoxEleTy(t)) {
326 t = ty;
327 continue;
328 }
329 if (auto seqTy = mlir::dyn_cast<fir::SequenceType>(t))
330 return seqTy;
331 return {};
332 }
333}
334
337inline fir::RecordType unwrapIfDerived(fir::BaseBoxType boxTy) {
338 return mlir::dyn_cast<fir::RecordType>(
339 fir::unwrapSequenceType(fir::unwrapRefType(boxTy.getEleTy())));
340}
341
344 auto recTy = unwrapIfDerived(boxTy);
345 return recTy && recTy.getNumLenParams() > 0;
346}
347
349inline bool isDerivedType(fir::BaseBoxType boxTy) {
350 return static_cast<bool>(unwrapIfDerived(boxTy));
351}
352
353#ifndef NDEBUG
354// !fir.ptr<X> and !fir.heap<X> where X is !fir.ptr, !fir.heap, or !fir.ref
355// is undefined and disallowed.
356inline bool singleIndirectionLevel(mlir::Type ty) {
357 return !fir::isa_ref_type(ty);
358}
359#endif
360
363bool isPointerType(mlir::Type ty);
364
366bool isAllocatableType(mlir::Type ty);
367
369bool isBoxNone(mlir::Type ty);
370
373bool isBoxedRecordType(mlir::Type ty);
374
376bool isTypeWithDescriptor(mlir::Type ty);
377
382bool isScalarBoxedRecordType(mlir::Type ty);
383
385mlir::Type getDerivedType(mlir::Type ty);
386
389bool isPolymorphicType(mlir::Type ty);
390
393bool isUnlimitedPolymorphicType(mlir::Type ty);
394
396bool isClassStarType(mlir::Type ty);
397
401bool isAssumedType(mlir::Type ty);
402
404bool isAssumedShape(mlir::Type ty);
405
407bool isAllocatableOrPointerArray(mlir::Type ty);
408
412 return static_cast<bool>(unwrapIfDerived(boxTy)) ||
414}
415
417unsigned getBoxRank(mlir::Type boxTy);
418
420mlir::Type unwrapInnerType(mlir::Type ty);
421
423bool isRecordWithAllocatableMember(mlir::Type ty);
424
427bool isRecordWithDescriptorMember(mlir::Type ty);
428
430inline bool isRecordWithTypeParameters(mlir::Type ty) {
431 if (auto recTy = mlir::dyn_cast_or_null<fir::RecordType>(ty))
432 return recTy.isDependentType();
433 return false;
434}
435
437bool isCharacterProcedureTuple(mlir::Type type, bool acceptRawFunc = true);
438
442mlir::Type applyPathToType(mlir::Type rootTy, mlir::ValueRange path);
443
446bool hasAbstractResult(mlir::FunctionType ty);
447
449mlir::Type fromRealTypeID(mlir::MLIRContext *context, llvm::Type::TypeID typeID,
450 fir::KindTy kind);
451
452int getTypeCode(mlir::Type ty, const KindMapping &kindMap);
453
454inline bool BaseBoxType::classof(mlir::Type type) {
455 return mlir::isa<fir::BoxType, fir::ClassType>(type);
456}
457
459inline bool isNoneOrSeqNone(mlir::Type type) {
460 if (auto seqTy = mlir::dyn_cast<fir::SequenceType>(type))
461 return mlir::isa<mlir::NoneType>(seqTy.getEleTy());
462 return mlir::isa<mlir::NoneType>(type);
463}
464
467inline mlir::Type wrapInClassOrBoxType(mlir::Type eleTy,
468 bool isPolymorphic = false,
469 bool isAssumedType = false) {
470 if (isPolymorphic && !isAssumedType)
471 return fir::ClassType::get(eleTy);
472 return fir::BoxType::get(eleTy);
473}
474
477mlir::Type updateTypeWithVolatility(mlir::Type type, bool isVolatile);
478
485inline mlir::Type updateTypeForUnlimitedPolymorphic(mlir::Type ty) {
486 if (auto seqTy = mlir::dyn_cast<fir::SequenceType>(ty))
487 return fir::SequenceType::get(
488 seqTy.getShape(), updateTypeForUnlimitedPolymorphic(seqTy.getEleTy()));
489 if (auto heapTy = mlir::dyn_cast<fir::HeapType>(ty))
490 return fir::HeapType::get(
491 updateTypeForUnlimitedPolymorphic(heapTy.getEleTy()));
492 if (auto pointerTy = mlir::dyn_cast<fir::PointerType>(ty))
493 return fir::PointerType::get(
494 updateTypeForUnlimitedPolymorphic(pointerTy.getEleTy()));
495 if (!mlir::isa<mlir::NoneType, fir::RecordType>(ty))
496 return mlir::NoneType::get(ty.getContext());
497 return ty;
498}
499
502mlir::Type updateTypeWithVolatility(mlir::Type type, bool isVolatile);
503
508mlir::Type changeElementType(mlir::Type type, mlir::Type newElementType,
509 bool turnBoxIntoClass);
510
512inline bool isBoxAddress(mlir::Type t) {
513 return fir::isa_ref_type(t) &&
514 mlir::isa<fir::BaseBoxType>(fir::unwrapRefType(t));
515}
516
518inline bool isBoxAddressOrValue(mlir::Type t) {
519 return mlir::isa<fir::BaseBoxType>(fir::unwrapRefType(t));
520}
521
523inline bool isBoxProcAddressType(mlir::Type t) {
525 return t && mlir::isa<fir::BoxProcType>(t);
526}
527
528inline bool isRefOfConstantSizeAggregateType(mlir::Type t) {
530 return t &&
531 mlir::isa<fir::CharacterType, fir::RecordType, fir::SequenceType>(t) &&
532 !hasDynamicSize(t);
533}
534
539std::string getTypeAsString(mlir::Type ty, const KindMapping &kindMap,
540 llvm::StringRef prefix = "");
541
548
550std::pair<std::uint64_t, unsigned short>
551getTypeSizeAndAlignmentOrCrash(mlir::Location loc, mlir::Type ty,
552 const mlir::DataLayout &dl,
553 const fir::KindMapping &kindMap);
554
556std::optional<std::pair<uint64_t, unsigned short>>
557getTypeSizeAndAlignment(mlir::Location loc, mlir::Type ty,
558 const mlir::DataLayout &dl,
559 const fir::KindMapping &kindMap);
560
561} // namespace fir
562
563#endif // FORTRAN_OPTIMIZER_DIALECT_FIRTYPE_H
This class provides a shared interface for box and class types.
Definition FIRType.h:40
Attribute
Box attributes.
Definition FIRType.h:45
BaseBoxType getBoxTypeWithNewAttr(Attribute attr) const
Return the same type, except for the attribute (fir.heap/fir.ptr).
Definition FIRType.cpp:1487
bool isVolatile() const
Is this a box describing volatile memory?
Definition FIRType.cpp:1524
bool isPointer() const
Is this a box for a pointer?
Definition FIRType.cpp:1516
bool isAssumedRank() const
Is this the box for an assumed rank?
Definition FIRType.cpp:1509
mlir::Type unwrapInnerType() const
Unwrap element type from fir.heap, fir.ptr and fir.array.
Definition FIRType.cpp:1426
mlir::Type getEleTy() const
Returns the element type of this box type.
Definition FIRType.cpp:1413
bool isPointerOrAllocatable() const
Does this box for a pointer or allocatable?
Definition FIRType.cpp:1520
mlir::Type getBaseAddressType() const
Get the raw address type of the memory described by the box.
Definition FIRType.cpp:1419
BaseBoxType getBoxTypeWithNewShape(mlir::Type shapeMold) const
Definition FIRType.cpp:1468
static bool classof(mlir::Type type)
Methods for support type inquiry through isa, cast, and dyn_cast.
Definition FIRType.h:454
Definition KindMapping.h:48
Definition FIRType.h:92
Definition AbstractConverter.h:34
bool isa_box_type(mlir::Type t)
Is t a boxed type?
Definition FIRType.h:127
int getTypeCode(mlir::Type ty, const KindMapping &kindMap)
Return the ISO_C_BINDING intrinsic module value of type ty.
Definition FIRType.cpp:493
bool isScalarBoxedRecordType(mlir::Type ty)
Definition FIRType.cpp:350
mlir::Type applyPathToType(mlir::Type rootTy, mlir::ValueRange path)
Definition FIROps.cpp:4887
std::string getTypeAsString(mlir::Type ty, const KindMapping &kindMap, llvm::StringRef prefix="")
Definition FIRType.cpp:590
fir::SequenceType unwrapUntilSeqType(mlir::Type t)
Definition FIRType.h:321
bool sequenceWithNonConstantShape(fir::SequenceType seqTy)
Definition FIRType.h:249
bool isa_ref_type(mlir::Type t)
Is t a FIR dialect type that implies a memory (de)reference?
Definition FIRType.h:121
bool isBoxAddressOrValue(mlir::Type t)
Is t a fir.box or class address or value type?
Definition FIRType.h:518
bool conformsWithPassByRef(mlir::Type t)
Definition FIRType.h:142
bool isa_volatile_type(mlir::Type t)
Definition FIRType.cpp:748
bool isa_builtin_cdevptr_type(mlir::Type t)
Is t type(c_devptr)?
Definition FIRType.h:165
mlir::Type updateTypeWithVolatility(mlir::Type type, bool isVolatile)
Definition FIRType.cpp:234
mlir::Type fromRealTypeID(mlir::MLIRContext *context, llvm::Type::TypeID typeID, fir::KindTy kind)
Convert llvm::Type::TypeID to mlir::Type.
Definition FIRType.cpp:1387
bool isUnlimitedPolymorphicType(mlir::Type ty)
Definition FIRType.cpp:410
bool isa_vector(mlir::Type t)
Is t a vector type?
Definition FIRType.h:193
mlir::Type unwrapPassByRefType(mlir::Type t)
Definition FIRType.h:292
bool isDerivedType(fir::BaseBoxType boxTy)
Return true iff boxTy wraps a fir::RecordType.
Definition FIRType.h:349
bool isa_char(mlir::Type t)
Is t a CHARACTER type? Does not check the length.
Definition FIRType.h:213
bool isBoxedRecordType(mlir::Type ty)
Definition FIRType.cpp:327
bool isBoxNone(mlir::Type ty)
Return true iff ty is !fir.box<none>.
Definition FIRType.cpp:321
mlir::Type unwrapSeqOrBoxedSeqType(mlir::Type ty)
Definition FIRType.cpp:474
bool isBoxAddress(mlir::Type t)
Is t an address to fir.box or class type?
Definition FIRType.h:512
mlir::Type updateTypeForUnlimitedPolymorphic(mlir::Type ty)
Definition FIRType.h:485
bool isa_derived(mlir::Type t)
Is t a derived (record) type?
Definition FIRType.h:147
bool isa_aggregate(mlir::Type t)
Is t a FIR dialect aggregate type?
Definition FIRType.h:172
bool isDerivedTypeWithLenParams(fir::BaseBoxType boxTy)
Return true iff boxTy wraps a fir::RecordType with length parameters.
Definition FIRType.h:343
mlir::Type unwrapInnerType(mlir::Type ty)
Return the inner type of the given type.
Definition FIRType.cpp:418
bool isAssumedShape(mlir::Type ty)
Return true iff ty is the type of an assumed shape array.
Definition FIRType.cpp:377
bool isCharacterProcedureTuple(mlir::Type type, bool acceptRawFunc=true)
Is this tuple type holding a character function and its result length?
Definition FIRType.cpp:1369
mlir::Type dyn_cast_ptrEleTy(mlir::Type t)
Definition FIRType.cpp:247
mlir::Type getDerivedType(mlir::Type ty)
Return the nested RecordType if one if found. Return ty otherwise.
Definition FIRType.cpp:222
bool isa_fir_or_std_type(mlir::Type t)
Is t any of the FIR dialect or Standard dialect types?
Definition FIRType.cpp:215
mlir::Type getFortranElementType(mlir::Type ty)
Definition FIRType.cpp:469
bool isNoneOrSeqNone(mlir::Type type)
Return true iff ty is none or fir.array<none>.
Definition FIRType.h:459
std::optional< std::pair< uint64_t, unsigned short > > getTypeSizeAndAlignment(mlir::Location loc, mlir::Type ty, const mlir::DataLayout &dl, const fir::KindMapping &kindMap)
This variant returns std::nullopt if an unsupported type is passed.
Definition FIRType.cpp:1547
fir::RecordType unwrapIfDerived(fir::BaseBoxType boxTy)
Definition FIRType.h:337
bool boxHasAddendum(fir::BaseBoxType boxTy)
Definition FIRType.h:411
bool isRecordWithAllocatableMember(mlir::Type ty)
Return true iff ty is a RecordType with members that are allocatable.
Definition FIRType.cpp:430
unsigned getBoxRank(mlir::Type boxTy)
Get the rank from a !fir.box type.
Definition FIRType.cpp:485
bool isClassStarType(mlir::Type ty)
Return true if CLASS(*)
Definition FIRType.cpp:340
mlir::Type dyn_cast_ptrOrBoxEleTy(mlir::Type t)
Definition FIRType.cpp:254
bool isPointerType(mlir::Type ty)
Definition FIRType.cpp:305
bool isTypeWithDescriptor(mlir::Type ty)
Return true iff ty is a type that contains descriptor information.
Definition FIRType.cpp:396
bool characterWithDynamicLen(mlir::Type t)
Returns true iff t is a fir.char type and has an unknown length.
Definition FIRType.h:241
bool isAllocatableType(mlir::Type ty)
Return true iff ty is the type of an ALLOCATABLE entity or value.
Definition FIRType.cpp:313
mlir::Type changeElementType(mlir::Type type, mlir::Type newElementType, bool turnBoxIntoClass)
Definition FIRType.cpp:685
bool isPolymorphicType(mlir::Type ty)
Definition FIRType.cpp:402
bool isa_builtin_cptr_type(mlir::Type t)
Is t type(c_ptr) or type(c_funptr)?
Definition FIRType.h:150
mlir::Type unwrapAllRefAndSeqType(mlir::Type ty)
Definition FIRType.cpp:458
bool hasAbstractResult(mlir::FunctionType ty)
Definition FIRType.cpp:1377
bool isAllocatableOrPointerArray(mlir::Type ty)
Return true iff ty is the type of an allocatable array.
Definition FIRType.cpp:384
bool isa_integer(mlir::Type t)
Is t an integral type?
Definition FIRType.h:188
mlir::Type extractSequenceType(mlir::Type ty)
Return the nested sequence type if any.
Definition FIRType.cpp:293
bool isa_char_string(mlir::Type t)
Is t a CHARACTER type with a LEN other than 1?
Definition FIRType.h:223
bool isRecordWithDescriptorMember(mlir::Type ty)
Definition FIRType.cpp:444
bool isBoxProcAddressType(mlir::Type t)
Is this a fir.boxproc address type?
Definition FIRType.h:523
bool isa_std_type(mlir::Type t)
Is t any of the Standard dialect types?
Definition FIRType.cpp:211
bool isa_passbyref_type(mlir::Type t)
Definition FIRType.h:134
std::pair< std::uint64_t, unsigned short > getTypeSizeAndAlignmentOrCrash(mlir::Location loc, mlir::Type ty, const mlir::DataLayout &dl, const fir::KindMapping &kindMap)
This variant terminates the compilation if an unsupported type is passed.
Definition FIRType.cpp:1601
bool hasDynamicSize(mlir::Type t)
Returns true iff the type t does not have a constant size.
Definition FIRType.cpp:280
mlir::Type boxMemRefType(fir::BaseBoxType t)
Get the memory reference type of the data pointer from the box type,.
Definition FIRType.h:267
bool isRecordWithTypeParameters(mlir::Type ty)
Return true iff ty is a RecordType with type parameters.
Definition FIRType.h:430
bool isAssumedType(mlir::Type ty)
Definition FIRType.cpp:364
void verifyIntegralType(mlir::Type type)
Definition FIRType.cpp:726
bool isa_complex(mlir::Type t)
Is t a floating point complex type?
Definition FIRType.h:206
bool isa_fir_type(mlir::Type t)
Is t any of the FIR dialect types?
Definition FIRType.cpp:207
mlir::Type wrapInClassOrBoxType(mlir::Type eleTy, bool isPolymorphic=false, bool isAssumedType=false)
Definition FIRType.h:467
bool isa_trivial(mlir::Type t)
Definition FIRType.h:217
mlir::Type unwrapSequenceType(mlir::Type t)
If t is a SequenceType return its element type, otherwise return t.
Definition FIRType.h:275
bool isa_unknown_size_box(mlir::Type t)
Definition FIRType.cpp:738
bool isa_real(mlir::Type t)
Is t a real type?
Definition FIRType.h:185
Definition AbstractConverter.h:29
Derived type storage.
Definition FIRType.cpp:149