[flang-commits] [flang] [flang] Fix RecordType sizes, TRANSFER lowering, and BIND(C) ABI on SystemZ/PPC64le (PR #220377)

via flang-commits flang-commits at lists.llvm.org
Tue Sep 15 05:03:13 PDT 2026


================
@@ -555,7 +555,46 @@ inline bool isRefOfConstantSizeAggregateType(mlir::Type t) {
 std::string getTypeAsString(mlir::Type ty, const KindMapping &kindMap,
                             llvm::StringRef prefix = "");
 
-/// Return the size and alignment of FIR types.
+/// Return the stored-representation width and ABI alignment of a FIR type.
+/// The width excludes trailing padding from the outermost object, but
+/// preserves padding within the representation. It can differ from the
+/// Fortran STORAGE_SIZE intrinsic result and is distinct from descriptor
+/// element extent and runtime TRANSFER copy width.
+std::optional<std::pair<uint64_t, unsigned short>>
+getTypeStoreSizeAndAlignment(mlir::Location loc, mlir::Type ty,
----------------
jeanPerier wrote:

I think the "StoreSize" may be confusing in the context of LLVM because LLVM `getTypeStoreSize` has a very similar name and is not doing what is described here.



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


More information about the flang-commits mailing list