[Mlir-commits] [mlir] [MLIR] Add index bitwidth to the DataLayout (PR #85927)

Christian Ulmann llvmlistbot at llvm.org
Wed Mar 20 07:50:42 PDT 2024


================
@@ -57,6 +57,13 @@ uint64_t
 getDefaultPreferredAlignment(Type type, const DataLayout &dataLayout,
                              ArrayRef<DataLayoutEntryInterface> params);
 
+/// Default handler for the index bitwidth request. Computes the result for
+/// the built-in index type and dispatches to the DataLayoutTypeInterface for
+/// other types.
+std::optional<uint64_t>
+getDefaultIndexBitwidth(Type type, const DataLayout &dataLayout,
----------------
Dinistro wrote:

I wonder if this could be limited to some Type interface, to ensure it is only accessed with types that work as expected. AFAIK, there is currently no "PointerLike" interface, though.

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


More information about the Mlir-commits mailing list