================
@@ -297,6 +317,20 @@ bool RecordType::isLayoutIdentical(const RecordType 
&other) {
 // Data Layout information for types
 
//===----------------------------------------------------------------------===//
 
+llvm::TypeSize
+PointerType::getTypeSizeInBits(const ::mlir::DataLayout &dataLayout,
+                               ::mlir::DataLayoutEntryListRef params) const {
+  // FIXME: improve this in face of address spaces
----------------
fabianmcg wrote:

For reference, here’s how ptr handles type size with the data layout.
https://github.com/llvm/llvm-project/blob/69a53b8d54a6876dd322923a148d47749b76c5fc/mlir/lib/Dialect/Ptr/IR/PtrTypes.cpp#L118

And here is an IR example:
https://github.com/llvm/llvm-project/blob/main/mlir/test/Dialect/Ptr/layout.mlir


https://github.com/llvm/llvm-project/pull/161028
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to