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
53 mlir::Type getBaseAddressType(bool dropHeapOrPtr = false) const;
54
56 mlir::Type unwrapInnerType() const;
57
58 // Get the element type or the fir.array
59 mlir::Type getElementOrSequenceType() const;
60
62 bool isAssumedRank() const;
63
65 bool isPointer() const;
66
68 bool isPointerOrAllocatable() const;
69
71 bool isVolatile() const;
72
74 bool isArray() const;
75
78 BaseBoxType getBoxTypeWithNewShape(mlir::Type shapeMold) const;
79 BaseBoxType getBoxTypeWithNewShape(int rank) const;
80
84 BaseBoxType getBoxTypeWithNewElementType(mlir::Type elementType,
85 bool polymorphic) const;
86
89
91 static bool classof(mlir::Type type);
92};
93
94} // namespace fir
95
96#define GET_TYPEDEF_CLASSES
97#include "flang/Optimizer/Dialect/FIROpsTypes.h.inc"
98
99namespace llvm {
100class raw_ostream;
101class StringRef;
102template <typename>
104class hash_code;
105} // namespace llvm
106
107namespace mlir {
108class DialectAsmParser;
109class DialectAsmPrinter;
110class ComplexType;
111class FloatType;
112class ValueRange;
113} // namespace mlir
114
115namespace fir {
116namespace detail {
117struct RecordTypeStorage;
118} // namespace detail
119
120// These isa_ routines follow the precedent of llvm::isa_or_null<>
121
123bool isa_fir_type(mlir::Type t);
124
126bool isa_std_type(mlir::Type t);
127
129bool isa_fir_or_std_type(mlir::Type t);
130
132inline bool isa_ref_type(mlir::Type t) {
133 return mlir::isa<fir::ReferenceType, fir::PointerType, fir::HeapType,
134 fir::LLVMPointerType>(t);
135}
136
138inline bool isa_box_type(mlir::Type t) {
139 return mlir::isa<fir::BaseBoxType, fir::BoxCharType, fir::BoxProcType>(t);
140}
141
145inline bool isa_passbyref_type(mlir::Type t) {
146 return mlir::isa<fir::ReferenceType, mlir::FunctionType>(t) ||
147 isa_box_type(t);
148}
149
153inline bool conformsWithPassByRef(mlir::Type t) {
154 return isa_ref_type(t) || isa_box_type(t) || mlir::isa<mlir::FunctionType>(t);
155}
156
158inline bool isa_derived(mlir::Type t) { return mlir::isa<fir::RecordType>(t); }
159
161inline bool isa_builtin_cptr_type(mlir::Type t) {
162 if (auto recTy = mlir::dyn_cast_or_null<fir::RecordType>(t))
163 return recTy.getName().ends_with("T__builtin_c_ptr") ||
164 recTy.getName().ends_with("T__builtin_c_funptr") ||
165 recTy.getName().ends_with("T__builtin_c_devptr");
166 return false;
167}
168
169// Is `t` type(c_devptr)?
170inline bool isa_builtin_c_devptr_type(mlir::Type t) {
171 if (auto recTy = mlir::dyn_cast_or_null<fir::RecordType>(t))
172 return recTy.getName().ends_with("T__builtin_c_devptr");
173 return false;
174}
175
177inline bool isa_builtin_cdevptr_type(mlir::Type t) {
178 if (auto recTy = mlir::dyn_cast_or_null<fir::RecordType>(t))
179 return recTy.getName().ends_with("T__builtin_c_devptr");
180 return false;
181}
182
184inline bool isa_aggregate(mlir::Type t) {
185 return mlir::isa<SequenceType, mlir::TupleType>(t) || fir::isa_derived(t);
186}
187
190mlir::Type dyn_cast_ptrEleTy(mlir::Type t);
191
194mlir::Type dyn_cast_ptrOrBoxEleTy(mlir::Type t);
195
197inline bool isa_real(mlir::Type t) { return mlir::isa<mlir::FloatType>(t); }
198
200inline bool isa_integer(mlir::Type t) {
201 return mlir::isa<mlir::IndexType, mlir::IntegerType, fir::IntegerType>(t);
202}
203
205inline bool isa_vector(mlir::Type t) {
206 return mlir::isa<mlir::VectorType, fir::VectorType>(t);
207}
208
209mlir::Type parseFirType(FIROpsDialect *, mlir::DialectAsmParser &parser);
210
211void printFirType(FIROpsDialect *, mlir::Type ty, mlir::DialectAsmPrinter &p);
212
215void verifyIntegralType(mlir::Type type);
216
218inline bool isa_complex(mlir::Type t) {
219 return mlir::isa<mlir::ComplexType>(t) &&
220 mlir::isa<mlir::FloatType>(
221 mlir::cast<mlir::ComplexType>(t).getElementType());
222}
223
225inline bool isa_char(mlir::Type t) { return mlir::isa<fir::CharacterType>(t); }
226
229inline bool isa_trivial(mlir::Type t) {
230 return isa_integer(t) || isa_real(t) || isa_complex(t) || isa_vector(t) ||
231 mlir::isa<fir::LogicalType>(t);
232}
233
235inline bool isa_char_string(mlir::Type t) {
236 if (auto ct = mlir::dyn_cast_or_null<fir::CharacterType>(t))
237 return ct.getLen() != fir::CharacterType::singleton();
238 return false;
239}
240
246bool isa_unknown_size_box(mlir::Type t);
247
250bool isa_volatile_type(mlir::Type t);
251
253inline bool characterWithDynamicLen(mlir::Type t) {
254 if (auto charTy = mlir::dyn_cast<fir::CharacterType>(t))
255 return charTy.hasDynamicLen();
256 return false;
257}
258
261inline bool sequenceWithNonConstantShape(fir::SequenceType seqTy) {
262 return seqTy.hasUnknownShape() || seqTy.hasDynamicExtents();
263}
264
266bool hasDynamicSize(mlir::Type t);
267
268inline unsigned getRankOfShapeType(mlir::Type t) {
269 if (auto shTy = mlir::dyn_cast<fir::ShapeType>(t))
270 return shTy.getRank();
271 if (auto shTy = mlir::dyn_cast<fir::ShapeShiftType>(t))
272 return shTy.getRank();
273 if (auto shTy = mlir::dyn_cast<fir::ShiftType>(t))
274 return shTy.getRank();
275 return 0;
276}
277
279inline mlir::Type boxMemRefType(fir::BaseBoxType t) {
280 auto eleTy = t.getEleTy();
281 if (!mlir::isa<fir::PointerType, fir::HeapType>(eleTy))
282 eleTy = fir::ReferenceType::get(t);
283 return eleTy;
284}
285
287inline mlir::Type unwrapSequenceType(mlir::Type t) {
288 if (auto seqTy = mlir::dyn_cast<fir::SequenceType>(t))
289 return seqTy.getEleTy();
290 return t;
291}
292
294mlir::Type extractSequenceType(mlir::Type ty);
295
296inline mlir::Type unwrapRefType(mlir::Type t) {
297 if (auto eleTy = dyn_cast_ptrEleTy(t))
298 return eleTy;
299 return t;
300}
301
304inline mlir::Type unwrapPassByRefType(mlir::Type t) {
305 if (auto eleTy = dyn_cast_ptrOrBoxEleTy(t))
306 return eleTy;
307 return t;
308}
309
315mlir::Type getFortranElementType(mlir::Type ty);
316
324mlir::Type unwrapSeqOrBoxedSeqType(mlir::Type ty);
325
329mlir::Type unwrapAllRefAndSeqType(mlir::Type ty);
330
333inline fir::SequenceType unwrapUntilSeqType(mlir::Type t) {
334 while (true) {
335 if (!t)
336 return {};
337 if (auto ty = dyn_cast_ptrOrBoxEleTy(t)) {
338 t = ty;
339 continue;
340 }
341 if (auto seqTy = mlir::dyn_cast<fir::SequenceType>(t))
342 return seqTy;
343 return {};
344 }
345}
346
349inline fir::RecordType unwrapIfDerived(fir::BaseBoxType boxTy) {
350 return mlir::dyn_cast<fir::RecordType>(
351 fir::unwrapSequenceType(fir::unwrapRefType(boxTy.getEleTy())));
352}
353
356 auto recTy = unwrapIfDerived(boxTy);
357 return recTy && recTy.getNumLenParams() > 0;
358}
359
361inline bool isDerivedType(fir::BaseBoxType boxTy) {
362 return static_cast<bool>(unwrapIfDerived(boxTy));
363}
364
365#ifndef NDEBUG
366// !fir.ptr<X> and !fir.heap<X> where X is !fir.ptr, !fir.heap, or !fir.ref
367// is undefined and disallowed.
368inline bool singleIndirectionLevel(mlir::Type ty) {
369 return !fir::isa_ref_type(ty);
370}
371#endif
372
375bool isPointerType(mlir::Type ty);
376
378bool isAllocatableType(mlir::Type ty);
379
381bool isBoxNone(mlir::Type ty);
382
385bool isBoxedRecordType(mlir::Type ty);
386
388bool isTypeWithDescriptor(mlir::Type ty);
389
394bool isScalarBoxedRecordType(mlir::Type ty);
395
397mlir::Type getDerivedType(mlir::Type ty);
398
401bool isPolymorphicType(mlir::Type ty);
402
405bool isUnlimitedPolymorphicType(mlir::Type ty);
406
408bool isClassStarType(mlir::Type ty);
409
413bool isAssumedType(mlir::Type ty);
414
416bool isAssumedShape(mlir::Type ty);
417
419bool isAllocatableOrPointerArray(mlir::Type ty);
420
424 return static_cast<bool>(unwrapIfDerived(boxTy)) ||
426}
427
429unsigned getBoxRank(mlir::Type boxTy);
430
432bool isRecordWithAllocatableMember(mlir::Type ty);
433
436bool isRecordWithDescriptorMember(mlir::Type ty);
437
439inline bool isRecordWithTypeParameters(mlir::Type ty) {
440 if (auto recTy = mlir::dyn_cast_or_null<fir::RecordType>(ty))
441 return recTy.isDependentType();
442 return false;
443}
444
446bool isCharacterProcedureTuple(mlir::Type type, bool acceptRawFunc = true);
447
451mlir::Type applyPathToType(mlir::Type rootTy, mlir::ValueRange path);
452
455bool hasAbstractResult(mlir::FunctionType ty);
456
458mlir::Type fromRealTypeID(mlir::MLIRContext *context, llvm::Type::TypeID typeID,
459 fir::KindTy kind);
460
461int getTypeCode(mlir::Type ty, const KindMapping &kindMap);
462
463inline bool BaseBoxType::classof(mlir::Type type) {
464 return mlir::isa<fir::BoxType, fir::ClassType>(type);
465}
466
468inline bool isNoneOrSeqNone(mlir::Type type) {
469 if (auto seqTy = mlir::dyn_cast<fir::SequenceType>(type))
470 return mlir::isa<mlir::NoneType>(seqTy.getEleTy());
471 return mlir::isa<mlir::NoneType>(type);
472}
473
476inline mlir::Type wrapInClassOrBoxType(mlir::Type eleTy,
477 bool isPolymorphic = false,
478 bool isAssumedType = false) {
479 if (isPolymorphic && !isAssumedType)
480 return fir::ClassType::get(eleTy);
481 return fir::BoxType::get(eleTy);
482}
483
486mlir::Type updateTypeWithVolatility(mlir::Type type, bool isVolatile);
487
494inline mlir::Type updateTypeForUnlimitedPolymorphic(mlir::Type ty) {
495 if (auto seqTy = mlir::dyn_cast<fir::SequenceType>(ty))
496 return fir::SequenceType::get(
497 seqTy.getShape(), updateTypeForUnlimitedPolymorphic(seqTy.getEleTy()));
498 if (auto heapTy = mlir::dyn_cast<fir::HeapType>(ty))
499 return fir::HeapType::get(
500 updateTypeForUnlimitedPolymorphic(heapTy.getEleTy()));
501 if (auto pointerTy = mlir::dyn_cast<fir::PointerType>(ty))
502 return fir::PointerType::get(
503 updateTypeForUnlimitedPolymorphic(pointerTy.getEleTy()));
504 if (!mlir::isa<mlir::NoneType, fir::RecordType>(ty))
505 return mlir::NoneType::get(ty.getContext());
506 return ty;
507}
508
511mlir::Type updateTypeWithVolatility(mlir::Type type, bool isVolatile);
512
517mlir::Type changeElementType(mlir::Type type, mlir::Type newElementType,
518 bool turnBoxIntoClass);
519
521inline bool isBoxAddress(mlir::Type t) {
522 return fir::isa_ref_type(t) &&
523 mlir::isa<fir::BaseBoxType>(fir::unwrapRefType(t));
524}
525
527inline bool isBoxAddressOrValue(mlir::Type t) {
528 return mlir::isa<fir::BaseBoxType>(fir::unwrapRefType(t));
529}
530
532inline bool isBoxProcAddressType(mlir::Type t) {
534 return t && mlir::isa<fir::BoxProcType>(t);
535}
536
537inline bool isRefOfConstantSizeAggregateType(mlir::Type t) {
539 return t &&
540 mlir::isa<fir::CharacterType, fir::RecordType, fir::SequenceType>(t) &&
541 !hasDynamicSize(t);
542}
543
548std::string getTypeAsString(mlir::Type ty, const KindMapping &kindMap,
549 llvm::StringRef prefix = "");
550
557
559std::pair<std::uint64_t, unsigned short>
560getTypeSizeAndAlignmentOrCrash(mlir::Location loc, mlir::Type ty,
561 const mlir::DataLayout &dl,
562 const fir::KindMapping &kindMap);
563
565std::optional<std::pair<uint64_t, unsigned short>>
566getTypeSizeAndAlignment(mlir::Location loc, mlir::Type ty,
567 const mlir::DataLayout &dl,
568 const fir::KindMapping &kindMap);
569
570} // namespace fir
571
572#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
mlir::Type getBaseAddressType(bool dropHeapOrPtr=false) const
Definition FIRType.cpp:1436
BaseBoxType getBoxTypeWithNewAttr(Attribute attr) const
Return the same type, except for the attribute (fir.heap/fir.ptr).
Definition FIRType.cpp:1519
BaseBoxType getBoxTypeWithNewElementType(mlir::Type elementType, bool polymorphic) const
Definition FIRType.cpp:1512
bool isVolatile() const
Is this a box describing volatile memory?
Definition FIRType.cpp:1556
bool isPointer() const
Is this a box for a pointer?
Definition FIRType.cpp:1548
bool isAssumedRank() const
Is this the box for an assumed rank?
Definition FIRType.cpp:1541
mlir::Type unwrapInnerType() const
Unwrap element type from fir.heap, fir.ptr and fir.array.
Definition FIRType.cpp:1443
mlir::Type getEleTy() const
Returns the element type of this box type.
Definition FIRType.cpp:1430
bool isPointerOrAllocatable() const
Does this box for a pointer or allocatable?
Definition FIRType.cpp:1552
BaseBoxType getBoxTypeWithNewShape(mlir::Type shapeMold) const
Definition FIRType.cpp:1492
static bool classof(mlir::Type type)
Methods for support type inquiry through isa, cast, and dyn_cast.
Definition FIRType.h:463
bool isArray() const
Is this a box describing an array or assumed-rank?
Definition FIRType.cpp:1558
Definition KindMapping.h:48
Definition FIRType.h:103
Definition AbstractConverter.h:37
bool isa_box_type(mlir::Type t)
Is t a boxed type?
Definition FIRType.h:138
int getTypeCode(mlir::Type ty, const KindMapping &kindMap)
Return the ISO_C_BINDING intrinsic module value of type ty.
Definition FIRType.cpp:481
bool isScalarBoxedRecordType(mlir::Type ty)
Definition FIRType.cpp:350
mlir::Type applyPathToType(mlir::Type rootTy, mlir::ValueRange path)
Definition FIROps.cpp:5821
std::string getTypeAsString(mlir::Type ty, const KindMapping &kindMap, llvm::StringRef prefix="")
Definition FIRType.cpp:578
fir::SequenceType unwrapUntilSeqType(mlir::Type t)
Definition FIRType.h:333
bool sequenceWithNonConstantShape(fir::SequenceType seqTy)
Definition FIRType.h:261
bool isa_ref_type(mlir::Type t)
Is t a FIR dialect type that implies a memory (de)reference?
Definition FIRType.h:132
bool isBoxAddressOrValue(mlir::Type t)
Is t a fir.box or class address or value type?
Definition FIRType.h:527
bool conformsWithPassByRef(mlir::Type t)
Definition FIRType.h:153
bool isa_volatile_type(mlir::Type t)
Definition FIRType.cpp:751
bool isa_builtin_cdevptr_type(mlir::Type t)
Is t type(c_devptr)?
Definition FIRType.h:177
mlir::Type updateTypeWithVolatility(mlir::Type type, bool isVolatile)
Definition FIRType.cpp:236
mlir::Type fromRealTypeID(mlir::MLIRContext *context, llvm::Type::TypeID typeID, fir::KindTy kind)
Convert llvm::Type::TypeID to mlir::Type.
Definition FIRType.cpp:1404
bool isUnlimitedPolymorphicType(mlir::Type ty)
Definition FIRType.cpp:410
bool isa_vector(mlir::Type t)
Is t a vector type?
Definition FIRType.h:205
mlir::Type unwrapPassByRefType(mlir::Type t)
Definition FIRType.h:304
bool isDerivedType(fir::BaseBoxType boxTy)
Return true iff boxTy wraps a fir::RecordType.
Definition FIRType.h:361
bool isa_char(mlir::Type t)
Is t a CHARACTER type? Does not check the length.
Definition FIRType.h:225
bool isBoxedRecordType(mlir::Type ty)
Definition FIRType.cpp:329
bool isBoxNone(mlir::Type ty)
Return true iff ty is !fir.box<none>.
Definition FIRType.cpp:323
mlir::Type unwrapSeqOrBoxedSeqType(mlir::Type ty)
Definition FIRType.cpp:462
bool isBoxAddress(mlir::Type t)
Is t an address to fir.box or class type?
Definition FIRType.h:521
mlir::Type updateTypeForUnlimitedPolymorphic(mlir::Type ty)
Definition FIRType.h:494
bool isa_derived(mlir::Type t)
Is t a derived (record) type?
Definition FIRType.h:158
bool isa_aggregate(mlir::Type t)
Is t a FIR dialect aggregate type?
Definition FIRType.h:184
bool isDerivedTypeWithLenParams(fir::BaseBoxType boxTy)
Return true iff boxTy wraps a fir::RecordType with length parameters.
Definition FIRType.h:355
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:1386
mlir::Type dyn_cast_ptrEleTy(mlir::Type t)
Definition FIRType.cpp:249
mlir::Type getDerivedType(mlir::Type ty)
Return the nested RecordType if one if found. Return ty otherwise.
Definition FIRType.cpp:225
bool isa_fir_or_std_type(mlir::Type t)
Is t any of the FIR dialect or Standard dialect types?
Definition FIRType.cpp:218
mlir::Type getFortranElementType(mlir::Type ty)
Definition FIRType.cpp:457
bool isNoneOrSeqNone(mlir::Type type)
Return true iff ty is none or fir.array<none>.
Definition FIRType.h:468
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:1583
fir::RecordType unwrapIfDerived(fir::BaseBoxType boxTy)
Definition FIRType.h:349
bool boxHasAddendum(fir::BaseBoxType boxTy)
Definition FIRType.h:423
bool isRecordWithAllocatableMember(mlir::Type ty)
Return true iff ty is a RecordType with members that are allocatable.
Definition FIRType.cpp:418
unsigned getBoxRank(mlir::Type boxTy)
Get the rank from a !fir.box type.
Definition FIRType.cpp:473
bool isClassStarType(mlir::Type ty)
Return true if CLASS(*)
Definition FIRType.cpp:341
mlir::Type dyn_cast_ptrOrBoxEleTy(mlir::Type t)
Definition FIRType.cpp:256
bool isPointerType(mlir::Type ty)
Definition FIRType.cpp:307
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:253
bool isAllocatableType(mlir::Type ty)
Return true iff ty is the type of an ALLOCATABLE entity or value.
Definition FIRType.cpp:315
mlir::Type changeElementType(mlir::Type type, mlir::Type newElementType, bool turnBoxIntoClass)
Definition FIRType.cpp:714
bool isPolymorphicType(mlir::Type ty)
Definition FIRType.cpp:402
bool isa_builtin_cptr_type(mlir::Type t)
Is t type(c_ptr), type(c_funptr), or type(c_devptr)?
Definition FIRType.h:161
mlir::Type unwrapAllRefAndSeqType(mlir::Type ty)
Definition FIRType.cpp:446
bool hasAbstractResult(mlir::FunctionType ty)
Definition FIRType.cpp:1394
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:200
mlir::Type extractSequenceType(mlir::Type ty)
Return the nested sequence type if any.
Definition FIRType.cpp:295
bool isa_char_string(mlir::Type t)
Is t a CHARACTER type with a LEN other than 1?
Definition FIRType.h:235
bool isRecordWithDescriptorMember(mlir::Type ty)
Definition FIRType.cpp:432
bool isBoxProcAddressType(mlir::Type t)
Is this a fir.boxproc address type?
Definition FIRType.h:532
bool isa_std_type(mlir::Type t)
Is t any of the Standard dialect types?
Definition FIRType.cpp:214
bool isa_passbyref_type(mlir::Type t)
Definition FIRType.h:145
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:1637
bool hasDynamicSize(mlir::Type t)
Returns true iff the type t does not have a constant size.
Definition FIRType.cpp:282
mlir::Type boxMemRefType(fir::BaseBoxType t)
Get the memory reference type of the data pointer from the box type,.
Definition FIRType.h:279
bool isRecordWithTypeParameters(mlir::Type ty)
Return true iff ty is a RecordType with type parameters.
Definition FIRType.h:439
bool isAssumedType(mlir::Type ty)
Definition FIRType.cpp:364
void verifyIntegralType(mlir::Type type)
Definition FIRType.cpp:729
bool isa_complex(mlir::Type t)
Is t a floating point complex type?
Definition FIRType.h:218
bool isa_fir_type(mlir::Type t)
Is t any of the FIR dialect types?
Definition FIRType.cpp:210
mlir::Type wrapInClassOrBoxType(mlir::Type eleTy, bool isPolymorphic=false, bool isAssumedType=false)
Definition FIRType.h:476
bool isa_trivial(mlir::Type t)
Definition FIRType.h:229
mlir::Type unwrapSequenceType(mlir::Type t)
If t is a SequenceType return its element type, otherwise return t.
Definition FIRType.h:287
bool isa_unknown_size_box(mlir::Type t)
Definition FIRType.cpp:741
bool isa_real(mlir::Type t)
Is t a real type?
Definition FIRType.h:197
Definition AbstractConverter.h:32
Derived type storage.
Definition FIRType.cpp:149