================
@@ -502,6 +502,15 @@ def CIR_RecordType : CIR_Type<"Record", "record",
 
     void complete(llvm::ArrayRef<mlir::Type> members, bool packed,
                   bool isPadded);
+
+  // Utilities for lazily computing and cacheing data layout info.
+  // FIXME: currently opaque because there's a cycle if CIRTypes.types include
+  // from CIRAttrs.h. The implementation operates in terms of RecordLayoutAttr
+  // instead.
+  private:
+    mutable mlir::Attribute layoutInfo;
----------------
xlauko wrote:

So the `RecordLayoutAttr` is not supposed to be considered in type 
uniquer/storage anyhow? 

This just comes to me as really unconventional placement of the "cache". If it 
is not meant to be stored in the IR why is it even Attribute, this could have 
been just class cashing desired information?

If the goal was to have it in the IR, I would expect some kay-value storage 
similar to `DLTI_MapAttr` and store it at modul level?

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

Reply via email to