@@ -225,17 +235,108 @@ void RecordType::complete(ArrayRef members, bool
packed, bool padded) {
//===--===//
llvm::TypeSize
-RecordType::getTypeSizeInBits(const ::mlir::DataLayout &dataLayout,
-
@@ -502,6 +502,15 @@ def CIR_RecordType : CIR_Type<"Record", "record",
void complete(llvm::ArrayRef members, bool packed,
bool isPadded);
+
+ // Utilities for lazily computing and cacheing data layout info.
+ // FIXME: currently opaque because there's a
https://github.com/andykaylor closed
https://github.com/llvm/llvm-project/pull/136036
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/xlauko approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/136036
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
andykaylor wrote:
@xlauko Are you happy with this after the latest update?
https://github.com/llvm/llvm-project/pull/136036
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/xlauko edited
https://github.com/llvm/llvm-project/pull/136036
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -502,6 +502,15 @@ def CIR_RecordType : CIR_Type<"Record", "record",
void complete(llvm::ArrayRef members, bool packed,
bool isPadded);
+
+ // Utilities for lazily computing and cacheing data layout info.
+ // FIXME: currently opaque because there's a
https://github.com/andykaylor edited
https://github.com/llvm/llvm-project/pull/136036
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/andykaylor updated
https://github.com/llvm/llvm-project/pull/136036
>From fbe118b75d5edf8077b46d2a4fdbf94b6f2395c6 Mon Sep 17 00:00:00 2001
From: Andy Kaylor
Date: Wed, 16 Apr 2025 13:44:04 -0700
Subject: [PATCH 1/3] [CIR] Upstream support for record packing and padding
This
@@ -225,17 +235,88 @@ void RecordType::complete(ArrayRef members, bool
packed, bool padded) {
//===--===//
llvm::TypeSize
-RecordType::getTypeSizeInBits(const ::mlir::DataLayout &dataLayout,
-
@@ -225,17 +235,88 @@ void RecordType::complete(ArrayRef members, bool
packed, bool padded) {
//===--===//
llvm::TypeSize
-RecordType::getTypeSizeInBits(const ::mlir::DataLayout &dataLayout,
-
https://github.com/andykaylor updated
https://github.com/llvm/llvm-project/pull/136036
>From fbe118b75d5edf8077b46d2a4fdbf94b6f2395c6 Mon Sep 17 00:00:00 2001
From: Andy Kaylor
Date: Wed, 16 Apr 2025 13:44:04 -0700
Subject: [PATCH 1/2] [CIR] Upstream support for record packing and padding
This
@@ -502,6 +502,15 @@ def CIR_RecordType : CIR_Type<"Record", "record",
void complete(llvm::ArrayRef members, bool packed,
bool isPadded);
+
+ // Utilities for lazily computing and cacheing data layout info.
+ // FIXME: currently opaque because there's a
@@ -225,17 +235,108 @@ void RecordType::complete(ArrayRef members, bool
packed, bool padded) {
//===--===//
llvm::TypeSize
-RecordType::getTypeSizeInBits(const ::mlir::DataLayout &dataLayout,
-
@@ -502,6 +502,15 @@ def CIR_RecordType : CIR_Type<"Record", "record",
void complete(llvm::ArrayRef members, bool packed,
bool isPadded);
+
+ // Utilities for lazily computing and cacheing data layout info.
+ // FIXME: currently opaque because there's a
https://github.com/xlauko edited
https://github.com/llvm/llvm-project/pull/136036
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/xlauko edited
https://github.com/llvm/llvm-project/pull/136036
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -229,4 +229,32 @@ def ConstPtrAttr : CIR_Attr<"ConstPtr", "ptr",
[TypedAttrInterface]> {
}];
}
+//===--===//
+// RecordLayoutAttr
+//===---
@@ -502,6 +502,15 @@ def CIR_RecordType : CIR_Type<"Record", "record",
void complete(llvm::ArrayRef members, bool packed,
bool isPadded);
+
+ // Utilities for lazily computing and cacheing data layout info.
+ // FIXME: currently opaque because there's a
https://github.com/bcardosolopes edited
https://github.com/llvm/llvm-project/pull/136036
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bcardosolopes approved this pull request.
LGTM once @xlauko is happy
https://github.com/llvm/llvm-project/pull/136036
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -225,17 +235,108 @@ void RecordType::complete(ArrayRef members, bool
packed, bool padded) {
//===--===//
llvm::TypeSize
-RecordType::getTypeSizeInBits(const ::mlir::DataLayout &dataLayout,
-
@@ -502,6 +502,15 @@ def CIR_RecordType : CIR_Type<"Record", "record",
void complete(llvm::ArrayRef members, bool packed,
bool isPadded);
+
+ // Utilities for lazily computing and cacheing data layout info.
+ // FIXME: currently opaque because there's a
https://github.com/xlauko edited
https://github.com/llvm/llvm-project/pull/136036
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -229,4 +229,32 @@ def ConstPtrAttr : CIR_Attr<"ConstPtr", "ptr",
[TypedAttrInterface]> {
}];
}
+//===--===//
+// RecordLayoutAttr
+//===---
https://github.com/xlauko edited
https://github.com/llvm/llvm-project/pull/136036
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -225,17 +235,108 @@ void RecordType::complete(ArrayRef members, bool
packed, bool padded) {
//===--===//
llvm::TypeSize
-RecordType::getTypeSizeInBits(const ::mlir::DataLayout &dataLayout,
-
@@ -502,6 +502,15 @@ def CIR_RecordType : CIR_Type<"Record", "record",
void complete(llvm::ArrayRef members, bool packed,
bool isPadded);
+
+ // Utilities for lazily computing and cacheing data layout info.
+ // FIXME: currently opaque because there's a
https://github.com/xlauko edited
https://github.com/llvm/llvm-project/pull/136036
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -502,6 +502,15 @@ def CIR_RecordType : CIR_Type<"Record", "record",
void complete(llvm::ArrayRef members, bool packed,
bool isPadded);
+
+ // Utilities for lazily computing and cacheing data layout info.
+ // FIXME: currently opaque because there's a
https://github.com/erichkeane approved this pull request.
I'm not sure I did a great job reviewing all the layout code, but didn't see
anything of concern. I'm somewhat fearful that we're pulling in existing
"scary" code from Classic-CodeGen that is a 'thar be dragons' though.
At the same tim
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Andy Kaylor (andykaylor)
Changes
This change adds support for packing and padding record types in ClangIR and
introduces some infrastructure needed for this computation.
Although union support has not been upstreamed yet, there is no good
https://github.com/andykaylor created
https://github.com/llvm/llvm-project/pull/136036
This change adds support for packing and padding record types in ClangIR and
introduces some infrastructure needed for this computation.
Although union support has not been upstreamed yet, there is no good w
33 matches
Mail list logo