| /llvm-project-15.0.7/flang/lib/Optimizer/CodeGen/ |
| H A D | PreCGRewrite.cpp | 77 matchAndRewrite(fir::EmboxOp embox, in matchAndRewrite() argument 80 if (auto shapeVal = embox.getShape()) in matchAndRewrite() 81 return rewriteDynamicShape(embox, rewriter, shapeVal); in matchAndRewrite() 85 return rewriteStaticShape(embox, rewriter, seqTy); in matchAndRewrite() 89 mlir::LogicalResult rewriteStaticShape(fir::EmboxOp embox, in rewriteStaticShape() argument 92 auto loc = embox.getLoc(); in rewriteStaticShape() 101 loc, embox.getType(), embox.getMemref(), shapeOpers, llvm::None, in rewriteStaticShape() 111 auto loc = embox.getLoc(); in rewriteDynamicShape() 125 if (auto s = embox.getSlice()) in rewriteDynamicShape() 136 loc, embox.getType(), embox.getMemref(), shapeOpers, shiftOpers, in rewriteDynamicShape() [all …]
|
| H A D | BoxedProcedure.cpp | 216 } else if (auto embox = mlir::dyn_cast<EmboxProcOp>(op)) { in runOnOperation() local 219 mlir::Type toTy = embox.getType().cast<BoxProcType>().getEleTy(); in runOnOperation() 220 rewriter.setInsertionPoint(embox); in runOnOperation() 221 if (embox.getHost()) { in runOnOperation() 223 auto module = embox->getParentOfType<mlir::ModuleOp>(); in runOnOperation() 226 auto loc = embox.getLoc(); in runOnOperation() 232 builder.createConvert(loc, i8Ptr, embox.getHost()); in runOnOperation() 235 builder.createConvert(loc, i8Ptr, embox.getFunc()); in runOnOperation() 242 rewriter.replaceOpWithNewOp<ConvertOp>(embox, toTy, in runOnOperation() 246 rewriter.replaceOpWithNewOp<ConvertOp>(embox, toTy, in runOnOperation() [all …]
|
| H A D | CodeGen.cpp | 1517 matchAndRewrite(fir::EmboxOp embox, OpAdaptor adaptor, in matchAndRewrite() 1520 assert(!embox.getShape() && "There should be no dims on this embox op"); in matchAndRewrite() 1522 embox, rewriter, /*rank=*/0, /*lenParams=*/operands.drop_front(1)); in matchAndRewrite() 1523 dest = insertBaseAddress(rewriter, embox.getLoc(), dest, operands[0]); in matchAndRewrite() 1525 TODO(embox.getLoc(), in matchAndRewrite() 1529 auto result = placeInMemoryIfNotGlobalInit(rewriter, embox.getLoc(), dest); in matchAndRewrite() 1530 rewriter.replaceOp(embox, result); in matchAndRewrite()
|
| /llvm-project-15.0.7/flang/test/Fir/ |
| H A D | box.fir | 8 %1 = fir.embox %0 : (!fir.heap<i32>) -> !fir.box<!fir.heap<i32>> 17 …%2 = fir.embox %0(%1) : (!fir.heap<!fir.array<?xf32>>, !fir.shape<1>) -> !fir.box<!fir.heap<!fir.a… 32 %b = fir.embox %a : (!fir.ref<f32>) -> !fir.box<f32> 48 …%b = fir.embox %c(%d) : (!fir.ref<!fir.array<?xf32>>, !fir.shape<1>) -> !fir.box<!fir.array<?xf32>> 62 …%x = fir.embox %arg0 typeparams %arg1 : (!fir.ref<!fir.char<1,?>>, index) -> !fir.box<!fir.char<1,… 76 …%2 = fir.embox %arg0(%1) : (!fir.ref<!fir.array<?x!fir.char<1,5>>>, !fir.shape<1>) -> !fir.box<!fi… 91 …%2 = fir.embox %arg0(%1) typeparams %arg1 : (!fir.ref<!fir.array<?x!fir.char<1,?>>>, !fir.shape<1>… 107 …%x = fir.embox %arg0(%1) typeparams %arg1 : (!fir.ref<!fir.array<7x!fir.char<1,?>>>, !fir.shape<1>… 160 …%box = fir.embox %0(%shape)[%slice] : (!fir.ref<!fir.array<?x?x?x?xf32>>, !fir.shape<4>, !fir.slic…
|
| H A D | cg-ops.fir | 11 …%3 = fir.embox %addr (%1) [%2] : (!fir.ref<!fir.array<?xi32>>, !fir.shapeshift<1>, !fir.slice<1>) … 30 …%3 = fir.embox %arr (%1) [%2] : (!fir.ref<!fir.array<?xi32>>, !fir.shapeshift<1>, !fir.slice<1>) -… 36 // fir.embox with slice with substr 46 …%3 = fir.embox %addr (%1) [%2] : (!fir.ref<!fir.array<?xi32>>, !fir.shapeshift<1>, !fir.slice<1>) …
|
| H A D | embox.fir | 27 …%3 = fir.embox %0(%1) [%2] : (!fir.ref<!fir.array<20xi32>>, !fir.shape<1>, !fir.slice<1>) -> !fir.… 59 …%5 = fir.embox %1(%3) [%4] : (!fir.ref<!fir.array<20x!fir.type<_QFtest_dt_sliceTt{i:i32,j:i32}>>>,… 76 …%2 = fir.embox %arg0(%0) [%1] : (!fir.ref<!fir.array<2x3x!fir.char<1,4>>>, !fir.shape<2>, !fir.sli… 90 // Test fir.embox with a constant interior array shape. 102 …%3 = fir.embox %arg0(%1) [%2] : (!fir.ref<!fir.array<40x?xf32>>, !fir.shapeshift<2>, !fir.slice<2>…
|
| H A D | ignore-missing-type-descriptor.fir | 2 // This is a debug option to allow manually writing derived type fir.embox without 13 %0 = fir.embox %addr : (!fir.ref<!some_freestyle_type>) -> !fir.box<!some_freestyle_type>
|
| H A D | type-descriptor.fir | 12 %1 = fir.embox %0 : (!fir.heap<!sometype>) -> !fir.box<!fir.heap<!sometype>> 24 %1 = fir.embox %0 : (!fir.heap<!some_pdt_type>) -> !fir.box<!fir.heap<!some_pdt_type>>
|
| H A D | boxaddr-folding.fir | 14 …%8 = fir.embox %arg0(%6) [%7] : (!fir.ref<!fir.array<?xi32>>, !fir.shape<1>, !fir.slice<1>) -> !fi… 37 …%7 = fir.embox %arg0(%6) : (!fir.ref<!fir.array<?xi32>>, !fir.shape<1>) -> !fir.box<!fir.array<?xi…
|
| H A D | abstract-results.fir | 77 %res = fir.embox %alloc : (!fir.heap<f64>) -> !fir.box<!fir.heap<f64>> 79 // CHECK: %[[box:.*]] = fir.embox %{{.*}} : (!fir.heap<f64>) -> !fir.box<!fir.heap<f64>> 83 // CHECK-BOX: %[[box:.*]] = fir.embox %{{.*}} : (!fir.heap<f64>) -> !fir.box<!fir.heap<f64>> 108 …// CHECK-BOX: %[[box:.*]] = fir.embox %[[buffer]](%[[shape]]) : (!fir.ref<!fir.array<?xf32>>, !fir… 128 …// CHECK-BOX: %[[box:.*]] = fir.embox %[[buffer]] : (!fir.ref<!fir.type<t{x:f32}>>) -> !fir.box<!f… 153 …// CHECK-BOX: %[[box:.*]] = fir.embox %[[buffer]] typeparams %[[l1]], %[[l2]] : (!fir.ref<!fir.typ… 198 …// CHECK-BOX: %[[box:.*]] = fir.embox %[[buffer]](%[[shape]]) typeparams %[[c50]] : (!fir.ref<!fir… 251 …// CHECK-BOX: %[[box:.*]] = fir.embox %[[buffer]](%[[shape]]) : (!fir.ref<!fir.array<?xf32>>, !fir…
|
| H A D | embox-write.fir | 9 …%a = fir.embox %aMem(%aDim) : (!fir.ref<!fir.array<?xi32>>, !fir.shape<1>) -> !fir.box<!fir.array<…
|
| H A D | arrayset.fir | 20 %6 = fir.embox %a : (!fir.ref<!fir.array<10xf32>>) -> !fir.box<!fir.array<10xf32>>
|
| H A D | invalid.fir | 307 // expected-error@+1 {{'fir.embox' op operand #0 must be any reference, but got 'i32'}} 308 %1 = fir.embox %0 : (i32) -> !fir.box<i32> 315 // expected-error@+1 {{'fir.embox' op shape must not be provided for a scalar}} 316 %2 = fir.embox %0(%1) : (!fir.ref<i32>, !fir.shape<1>) -> !fir.box<i32> 324 …// expected-error@+1 {{'fir.embox' op operand #1 must be any legal shape type, but got '!fir.slice… 325 %2 = fir.embox %0(%1) : (!fir.ref<i32>, !fir.slice<1>) -> !fir.box<i32> 333 // expected-error@+1 {{'fir.embox' op operand #1 must be FIR slice, but got '!fir.shape<1>'}} 334 %2 = fir.embox %0[%1] : (!fir.ref<i32>, !fir.shape<1>) -> !fir.box<i32> 342 // expected-error@+1 {{'fir.embox' op slice must not be provided for a scalar}} 343 %2 = fir.embox %0[%1] : (!fir.ref<i32>, !fir.slice<1>) -> !fir.box<i32>
|
| H A D | array-value-copy-3.fir | 41 // CHECK: %[[VAL_12:.*]] = fir.embox %[[VAL_11]](%[[VAL_9]]) : (!fir.heap<!fir.array<10x!fir.type…
|
| H A D | convert-to-llvm.fir | 120 %1 = fir.embox %0 : (!fir.ptr<i32>) -> !fir.box<!fir.ptr<i32>> 1499 // Test `fir.embox` conversion. 1537 // Check `fir.embox` in a `fir.global`. Descriptors created by `fir.embox` 1551 // Check `fir.embox` conversion of a POINTER entity. Make sure that the 1556 %0 = fir.embox %arg0 : (!fir.ref<i32>) -> !fir.box<!fir.ptr<i32>> 1567 // Check `fir.embox` conversion of an ALLOCATABLE entity. Make sure that the 1581 // Check `fir.embox` conversion of a type code. 1584 %0 = fir.embox %arg0 : (!fir.ref<i64>) -> !fir.box<!fir.ptr<i64>> 1594 %0 = fir.embox %arg0 : (!fir.ref<f32>) -> !fir.box<!fir.ptr<f32>> 1604 %0 = fir.embox %arg0 : (!fir.ref<f128>) -> !fir.box<!fir.ptr<f128>> [all …]
|
| H A D | fir-ops.fir | 49 // CHECK: [[VAL_6:%.*]] = fir.embox [[VAL_5]] : (!fir.heap<!fir.array<100xf32>>) -> !fir.box<!fir.a… 53 %6 = fir.embox %5 : (!fir.heap<!fir.array<100xf32>>) -> !fir.box<!fir.array<100xf32>> 151 // CHECK: [[VAL_42:%.*]] = fir.embox [[VAL_38]] : (!fir.ref<i32>) -> !fir.box<i32> 177 %1 = fir.embox %0 : (!fir.ref<i32>) -> !fir.box<i32>
|
| /llvm-project-15.0.7/flang/include/flang/Optimizer/CodeGen/ |
| H A D | CGOps.td | 30 // Extended embox operation. 35 Prior to lowering to LLVM IR dialect, a non-scalar non-trivial embox op will 36 be converted to an extended embox. This op will have the following sets of 147 Prior to lowering to LLVM IR dialect, a non-scalar non-trivial embox op will 148 be converted to an extended embox. This op will have the following sets of
|
| /llvm-project-15.0.7/flang/lib/Lower/ |
| H A D | ConvertVariable.cpp | 247 auto embox = mlir::cast<fir::EmboxOp>(*op); in genInitialDataTarget() local 249 mlir::Value memref = builder.createConvert(loc, ptrType, embox.getMemref()); in genInitialDataTarget() 252 return builder.create<fir::EmboxOp>(loc, boxType, memref, embox.getShape(), in genInitialDataTarget() 253 embox.getSlice()); in genInitialDataTarget() 257 return builder.create<fir::EmboxOp>(loc, boxType, memref, embox.getShape(), in genInitialDataTarget() 258 embox.getSlice(), in genInitialDataTarget()
|
| H A D | ConvertExpr.cpp | 5974 mlir::Value embox = in genarr() local 5982 return [=](IterSpace) -> ExtValue { return fir::BoxValue(embox); }; in genarr() 7137 mlir::Value embox = in applyPathToArrayLoad() local 7141 return arrayLoadExtValue(builder, loc, load, iters.iterVec(), embox); in applyPathToArrayLoad()
|
| /llvm-project-15.0.7/flang/include/flang/Optimizer/Dialect/ |
| H A D | FIRTypes.td | 601 "any legal embox argument type">; 602 def AnyEmboxArg : Type<AnyEmboxLike.predicate, "embox argument type">;
|
| H A D | FIROps.td | 242 references, such as the result of an `fir.embox`. 731 def fir_EmboxOp : fir_Op<"embox", [NoSideEffect, AttrSizedOperandSegments]> { 744 %6 = fir.embox %5 : (!fir.ref<!fir.array<10 x i32>>) -> !fir.box<!fir.array<10 x i32>> 1050 return true if the originating box value was from a `fir.embox` op 1055 %b = fir.embox %r : (!fir.heap<i64>) -> !fir.box<i64> 1073 true if the originating box value was from a fir.embox with a memory 1080 %b = fir.embox %r(%d) : (!fir.ref<i64>, !fir.shape<1>) -> !fir.box<i64> 1098 %b = fir.embox %p : (!fir.ptr<i64>) -> !fir.box<i64>
|