• Home
  • Raw
  • Download

Lines Matching refs:fir

23   let name = "fir";
24 let cppNamespace = "::fir";
29 def fir_Type : Type<CPred<"fir::isa_fir_or_std_type($_self)">,
33 def fir_CharacterType : Type<CPred<"$_self.isa<fir::CharacterType>()">,
35 def fir_ComplexType : Type<CPred<"$_self.isa<fir::CplxType>()">,
37 def fir_IntegerType : Type<CPred<"$_self.isa<fir::IntType>()">,
39 def fir_LogicalType : Type<CPred<"$_self.isa<fir::LogicalType>()">,
41 def fir_RealType : Type<CPred<"$_self.isa<fir::RealType>()">,
54 def fir_RecordType : Type<CPred<"$_self.isa<fir::RecordType>()">,
58 def fir_SequenceType : Type<CPred<"$_self.isa<fir::SequenceType>()">,
67 def fir_ReferenceType : Type<CPred<"$_self.isa<fir::ReferenceType>()">,
71 def fir_HeapType : Type<CPred<"$_self.isa<fir::HeapType>()">,
75 def fir_PointerType : Type<CPred<"$_self.isa<fir::PointerType>()">,
83 def fir_BoxType : Type<CPred<"$_self.isa<fir::BoxType>()">, "box type">;
86 def fir_BoxCharType : Type<CPred<"$_self.isa<fir::BoxCharType>()">,
90 def fir_BoxProcType : Type<CPred<"$_self.isa<fir::BoxProcType>()">,
101 def fir_DimsType : Type<CPred<"$_self.isa<fir::DimsType>()">, "dim type">;
108 def fir_TypeDescType : Type<CPred<"$_self.isa<fir::TypeDescType>()">,
112 def fir_FieldType : Type<CPred<"$_self.isa<fir::FieldType>()">, "field type">;
115 def fir_LenType : Type<CPred<"$_self.isa<fir::LenType>()">,
129 // All operations automatically get a prefix of "fir.".
316 reference to the object of type `!fir.ref<T>` is returned. The returned
323 %x = fir.alloca i32
324 %y = fir.alloca !fir.array<8 x i64>
325 %z = fir.alloca f32, %c
329 %w = fir.alloca !fir.type<PT(len1:i16, len2:i32)> (%i, %j : i16, i32)
345 if (!outType.isa<fir::ReferenceType>())
346 return emitOpError("must be a !fir.ref type");
360 has type `!fir.ref<T>`, `!fir.heap<T>`, or `!fir.ptr<T>`.
363 %a = fir.alloca i32
364 %l = fir.load %a : !fir.ref<i32>
380 auto refTy = refVal.getType().cast<fir::ReferenceType>();
422 %p = ... : !fir.ptr<f64>
423 fir.store %v to %p : !fir.ptr<f64>
459 if (value().getType() != fir::dyn_cast_ptrEleTy(memref().getType()))
474 pass. An undefined value can be of any type except `!fir.ref<T>`.
477 %a = fir.undefined !fir.array<10 x !fir.type<T>>
481 10, and each element has type `!fir.type<T>`.
499 given type, T. The heap refernce returned has type `!fir.heap<T>`.
504 %0 = fir.allocmem !fir.array<10 x f32>
505 fir.freemem %0 : !fir.heap<!fir.array<10 x f32>>
513 if (!outType.dyn_cast<fir::HeapType>())
514 return emitOpError("must be a !fir.heap type");
529 after `fir.freemem`. Optimizations may treat the loading of an object
531 references, such as the result of an `fir.embox`.
534 %21 = fir.allocmem !fir.type<ZT(p:i32){field:i32}>
536 fir.freemem %21 : !fir.heap<!fir.type<ZT>>
712 getSelector().getType().isa<fir::IntType>()))
745 fir.select %arg:i32 [1, ^bb1(%0 : i32),
765 fir.select_rank %arg:i32 [1, ^bb1(%0 : i32),
785 fir.select_case %arg : i32 [
786 #fir.point, %0, ^bb1(%0 : i32),
787 #fir.lower, %1, ^bb2(%2,%arg,%arg2,%1 : i32,i32,i32,i32),
788 #fir.interval, %2, %3, ^bb3(%2,%arg2 : i32,i32),
789 #fir.upper, %arg, ^bb4(%1 : i32),
823 if (cases[i].isa<fir::ClosedIntervalAttr>()) {
838 getSelector().getType().isa<fir::IntType>() ||
839 getSelector().getType().isa<fir::LogicalType>() ||
840 getSelector().getType().isa<fir::CharacterType>()))
854 if (!(attr.isa<fir::PointIntervalAttr>() ||
855 attr.isa<fir::LowerBoundAttr>() ||
856 attr.isa<fir::UpperBoundAttr>() ||
857 attr.isa<fir::ClosedIntervalAttr>() ||
880 fir.select_type %arg : !fir.box<()> [
881 #fir.instance<!fir.type<type1>>, ^bb1(%0 : i32),
882 #fir.instance<!fir.type<type2>>, ^bb2(%2 : i32),
883 #fir.subsumed<!fir.type<type3>>, ^bb3(%2 : i32),
884 #fir.instance<!fir.type<type4>>, ^bb4(%1,%3 : i32,f32),
942 if (!(getSelector().getType().isa<fir::BoxType>()))
954 if (!(attr.isa<fir::ExactTypeAttr>() || attr.isa<fir::SubclassAttr>() ||
975 fir.unreachable
1004 %2 = fir.undefined tuple<i32, f32>
1006 %4 = fir.insert_value %2, %0, %3 : (tuple<i32, f32>, i32, index) -> tuple<i32, f32>
1008 %6 = fir.insert_value %4, %1, %5 : (tuple<i32, f32>, f32, index) -> tuple<i32, f32>
1009 fir.has_value %6 : tuple<i32, f32>
1019 // Operations on !fir.box<T> type objects
1033 %4 = fir.dims(%c1, %c10, %c1) : (index, index, index) -> !fir.dims<1>
1034 %5 = ... : !fir.ref<!fir.array<10 x i32>>
1035 …%6 = fir.embox %5, %4 : (!fir.ref<!fir.array<10 x i32>>, !fir.dims<1>) -> !fir.box<!fir.array<10 x…
1070 auto eleTy = fir::dyn_cast_ptrEleTy(memref().getType());
1073 if (auto rt = eleTy.dyn_cast<fir::RecordType>()) {
1076 " to the !fir.type type");
1078 return emitOpError("LEN parameters require !fir.type type");
1081 if (lp.getType().isa<fir::DimsType>())
1089 if (!d.getType().isa<fir::DimsType>())
1090 return emitOpError("dimension argument must have !fir.dims type");
1092 return emitOpError("embox can only have one !fir.dim argument");
1128 %4 = ... : !fir.ref<!fir.array<10 x !fir.char<1>>>
1130 %6 = fir.emboxchar %4, %5 : (!fir.ref<!fir.array<10 x !fir.char<1>>>, i32) -> !fir.boxchar<1>
1163 %0 = fir.emboxproc @f : ((i32) -> i32) -> !fir.boxproc<(i32) -> i32>
1173 %4 = ... : !fir.ref<tuple<i32, i32>>
1174 …%5 = fir.emboxproc @g, %4 : ((i32) -> i32, !fir.ref<tuple<i32, i32>>) -> !fir.boxproc<(i32) -> i32>
1253 %40 = ... : !fir.box<!fir.type<T>>
1254 …%41:6 = fir.unbox %40 : (!fir.box<!fir.type<T>>) -> (!fir.ref<!fir.type<T>>, i32, i32, !fir.tdesc<…
1278 %45 = ... : !fir.boxchar<1>
1279 %46:2 = fir.unboxchar %45 : (!fir.boxchar<1>) -> (!fir.ref<!fir.character<1>>, i32)
1296 %47 = ... : !fir.boxproc<() -> i32>
1297 %48:2 = fir.unboxproc %47 : (!fir.ref<() -> i32>, !fir.ref<tuple<f32, i32>>)
1302 if (auto eleTy = fir::dyn_cast_ptrEleTy(refTuple().getType()))
1323 %51 = fir.box_addr %box : (!fir.box<f64>) -> !fir.ref<f64>
1324 %52 = fir.box_addr %boxchar : (!fir.boxchar<1>) -> !fir.ref<!fir.char<1>>
1325 %53 = fir.box_addr %boxproc : (!fir.boxproc<!P>) -> !fir.ref<!P>
1344 %59 = fir.boxchar_len %45 : (!fir.boxchar<1>) -> i64 // len=20
1366 %52:3 = fir.box_dims %40, %c1 : (!fir.box<!fir.array<*:f64>>, i32) -> (i32, i32, i32)
1394 %53 = fir.box_elesize %40 : (!fir.box<f32>, i32) -> i32 // size=4
1395 %54 = fir.box_elesize %40 : (!fir.box<!fir.array<*:f32>>, i32) -> i32
1412 return true if the originating box value was from a `fir.embox` op
1413 with a mem-ref value that had the type !fir.heap<T>.
1416 %r = ... : !fir.heap<i64>
1417 %b = fir.embox %r : (!fir.heap<i64>) -> !fir.box<i64>
1418 %a = fir.box_isalloc %b : (!fir.box<i64>) -> i1 // true
1435 true if the originating box value was from a fir.embox with a memory
1436 reference value that had the type !fir.array<T> and/or a dims argument.
1439 %r = ... : !fir.ref<i64>
1440 %d = fir.gendims(1, 100, 1) : (i32, i32, i32) -> !fir.dims<1>
1441 %b = fir.embox %r, %d : (!fir.ref<i64>, !fir.dims<1>) -> !fir.box<i64>
1442 %a = fir.box_isarray %b : (!fir.box<i64>) -> i1 // true
1458 %p = ... : !fir.ptr<i64>
1459 %b = fir.embox %p : (!fir.ptr<i64>) -> !fir.box<i64>
1460 %a = fir.box_isptr %b : (!fir.box<i64>) -> i1 // true
1476 %8 = ... : !fir.boxproc<(!fir.ref<!fir.type<T>>) -> i32>
1477 …%9 = fir.boxproc_host %8 : (!fir.boxproc<(!fir.ref<!fir.type<T>>) -> i32>) -> !fir.ref<tuple<i32, …
1499 %57 = fir.box_rank %40 : (!fir.box<!fir.array<*:f64>>) -> i32
1500 %58 = fir.box_rank %41 : (!fir.box<f64>) -> i32
1522 %7 = fir.box_tdesc %41 : (!fir.box<f64>) -> !fir.tdesc<f64>
1549 %h = ... : !fir.heap<!fir.array<100 x f32>>
1550 %p = fir.coordinate_of %h, %i : (!fir.heap<!fir.array<100 x f32>>, index) -> !fir.ref<f32>
1573 if (fir::isa_ref_type(refTy)) {
1574 auto eleTy = fir::dyn_cast_ptrEleTy(refTy);
1575 if (auto arrTy = eleTy.dyn_cast<fir::SequenceType>()) {
1618 specified component. Cannot be used on values of `!fir.box` type.
1624 %f = fir.field_index field, !fir.type<X{field:i32}>
1625 %s = ... : !fir.type<X>
1626 %v = fir.extract_value %s, %f : (!fir.type<X>, !fir.field) -> i32
1646 known at compile-time. The type of a field value is `!fir.field` and
1647 these values can be used with the `fir.coordinate_of`, `fir.extract_value`,
1648 or `fir.insert_value` instructions to compute (abstract) addresses of
1652 %f = fir.field_index field, !fir.type<X{field:i32}>
1685 mlir::Type fieldType = fir::FieldType::get(builder.getContext());
1727 let summary = "generate a value of type `!fir.dims`";
1739 %d = fir.gendims %lo, %ext, %str : (index, index, index) -> !fir.dims<1>
1767 original entity. Cannot be used on values of `!fir.box` type.
1773 %a = ... : !fir.array<10xtuple<i32, f32>>
1777 …%b = fir.insert_value %a, %f, %o, %c : (!fir.array<10x20xtuple<i32, f32>>, f32, i32, i32) -> !fir.…
1796 The type of a LEN parameter value is `!fir.len` and these values can be
1797 used with the `fir.coordinate_of` instructions to compute (abstract)
1801 %e = fir.len_param_index len1, !fir.type<X(len1:i32)>
1802 %p = ... : !fir.box<!fir.type<X>>
1803 %q = fir.coordinate_of %p, %e : (!fir.box<!fir.type<X>>, !fir.len) -> !fir.ref<i32>
1821 mlir::Type lenType = fir::LenType::get(builder.getContext());
1856 let summary = "special terminator for use in fir region operations";
1897 fir.do_loop %i = %l to %u step %s unordered {
1898 %x = fir.convert %i : (index) -> i32
1899 %v = fir.call @compute(%x) : (i32) -> f32
1900 %p = fir.coordinate_of %A, %i : (!fir.ref<f32>, index) -> !fir.ref<f32>
1901 fir.store %v to %p : !fir.ref<f32>
1980 %78 = ... : !fir.ref<!T>
1981 fir.if %56 {
1982 fir.store %76 to %78 : !fir.ref<!T>
1984 fir.store %77 to %78 : !fir.ref<!T>
2023 to `fir::LoopOp` with the addition that it requires a single loop-carried
2026 indicates that the `fir.iterate_while` operation should terminate and
2098 in the FIR dialect, e.g. `fir.call @sub(%12)` or `fir.call %20(%22,%23)`.
2101 %a = fir.call %funcref(%arg0) : (!fir.ref<f32>) -> f32
2102 %b = fir.call @function(%arg1, %arg2) : (!fir.ref<f32>, !fir.ref<f32>) -> f32
2131 %r = fir.dispatch methodA(%o) : (!fir.box<none>) -> i32
2205 %1 = fir.string_lit "Hello, World!"(13) : !fir.char<1> // ASCII
2206 %2 = fir.string_lit [158, 2345](2) : !fir.char<2> // Wide chars
2232 if (!(type.isa<fir::CharacterType>() || type.isa<mlir::IntegerType>()))
2235 type = fir::SequenceType::get({sz.getInt()}, type);
2244 p.printType(getType().cast<fir::SequenceType>().getEleTy());
2250 auto eleTy = getType().cast<fir::SequenceType>().getEleTy();
2251 if (!eleTy.isa<fir::CharacterType>())
2252 return emitOpError("must have !fir.char type");
2305 def FirRealAttr : Attr<CPred<"$_self.isa<fir::RealAttr>()">, "FIR real attr"> {
2306 let storageType = [{ fir::RealAttr }];
2325 if (!getType().isa<fir::RealType>())
2326 return emitOpError("must be a !fir.real type");
2402 fir::RealAttr realp;
2403 fir::RealAttr imagp;
2430 if (!getType().isa<fir::CplxType>())
2431 return emitOpError("must be a !fir.complex type");
2504 %p = fir.address_of(@symbol) : !fir.ref<f64>
2525 %w = fir.convert %v : (i64) -> i32
2551 (inType.isa<fir::BoxType>() && outType.isa<fir::BoxType>()) ||
2552 (fir::isa_complex(inType) && fir::isa_complex(outType)))
2565 Or<[CPred<"$_self.cast<TypeAttr>().getValue().isa<fir::CharacterType>()">,
2566 CPred<"$_self.cast<TypeAttr>().getValue().isa<fir::CplxType>()">,
2567 CPred<"$_self.cast<TypeAttr>().getValue().isa<fir::IntType>()">,
2568 CPred<"$_self.cast<TypeAttr>().getValue().isa<fir::LogicalType>()">,
2569 CPred<"$_self.cast<TypeAttr>().getValue().isa<fir::RealType>()">,
2570 CPred<"$_self.cast<TypeAttr>().getValue().isa<fir::RecordType>()">]>]>,
2582 is `!fir.tdesc<T>`.
2585 !T = type !fir.type<T{...}>
2586 %t = fir.gentypedesc !T // returns value of !fir.tdesc<!T>
2618 return emitOpError("must be !fir.tdesc type");
2645 %99 = fir.no_reassoc %98 : f32
2669 fir.global @_QV_Mquark_Vvarble : tuple<i32, f32> {
2672 %3 = fir.undefined tuple<i32, f32>
2675 %4 = fir.insert_value %3, %1, %z : (tuple<i32, f32>, i32, index) -> tuple<i32, f32>
2676 %5 = fir.insert_value %4, %2, %o : (tuple<i32, f32>, f32, index) -> tuple<i32, f32>
2677 fir.has_value %5 : tuple<i32, f32>
2746 return fir::AllocaOp::wrapResultType(getType());
2767 !isa<fir::FirEndOp>(getBlock().front());
2782 These values can be bound to the global instance used `fir.global_len`.
2785 global @g : !fir.type<t(len1:i32)> {
2786 fir.global_len len1, 10 : i32
2787 %1 = fir.undefined : !fir.type<t(len1:i32)>
2788 return %1 : !fir.type<t(len1:i32)>
2839 fir.dispatch_table @_QDTMquuzTfoo {
2840 fir.dt_entry method1, @_QFNMquuzTfooPmethod1AfooR
2841 fir.dt_entry method2, @_QFNMquuzTfooPmethod2AfooII
2880 if (!(isa<fir::DTEntryOp>(op) || isa<fir::FirEndOp>(op)))
2923 fir.dt_entry method_name, @uniquedProcedure