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

Christian Ulmann llvmlistbot at llvm.org
Wed Mar 20 08:06:19 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 would assume that this is only queried for special types in the first place. Still, users might require casting to such an interface even in then.

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


More information about the Mlir-commits mailing list