[flang-commits] [flang] [flang][codegen] Update FIR codegen to use mlir.llvm opaque pointers (PR #69692)

Valentin Clement バレンタイン クレメン via flang-commits flang-commits at lists.llvm.org
Tue Oct 24 09:08:44 PDT 2023


================
@@ -2448,14 +2465,19 @@ struct XArrayCoorOpConversion
           operands.slice(coor.subcomponentOffset(),
                          coor.getSubcomponent().size()));
       args.append(indices.begin(), indices.end());
-      rewriter.replaceOpWithNewOp<mlir::LLVM::GEPOp>(coor, ty, casted, args);
+      rewriter.replaceOpWithNewOp<mlir::LLVM::GEPOp>(coor, llvmPtrTy,
+                                                     elementType, addr, args);
       return mlir::success();
     }
 
     // The array was not boxed, so it must be contiguous. offset is therefore an
     // element offset and the base type is kept in the GEP unless the element
     // type size is itself dynamic.
-    mlir::Value base;
+    mlir::Type objectTy = fir::unwrapRefType(coor.getMemref().getType());
+    mlir::Type eleType = fir::unwrapSequenceType(objectTy);
+    mlir::Type gepObjectType = convertType(eleType);
+    llvm::SmallVector<mlir::LLVM::GEPArg> args;
+    ;
----------------
clementval wrote:

```suggestion

```

https://github.com/llvm/llvm-project/pull/69692


More information about the flang-commits mailing list