[Mlir-commits] [mlir] [MLIR][LLVM] Import dereferenceable metadata from LLVM IR (PR #130974)
Tobias Gysi
llvmlistbot at llvm.org
Wed Mar 12 10:26:19 PDT 2025
================
@@ -1267,4 +1267,28 @@ def WorkgroupAttributionAttr
let assemblyFormat = "`<` $num_elements `,` $element_type `>`";
}
+//===----------------------------------------------------------------------===//
+// DereferenceableAttr
+//===----------------------------------------------------------------------===//
+
+def LLVM_DereferenceableAttr : LLVM_Attr<"Dereferenceable", "dereferenceable"> {
+ let summary = "LLVM dereferenceable attribute";
+ let description = [{
+ Defines `dereferenceable` or `dereferenceable_or_null` metadata that can
+ be set via the `DereferenceableOpInterface` on an `inttoptr` operation or
+ on a `load` operation which loads a pointer. The attribute is used to
----------------
gysit wrote:
Ideally we would add a check to the LoadOp verifier that checks the load returns a pointer if the attribute is set.
https://github.com/llvm/llvm-project/pull/130974
More information about the Mlir-commits
mailing list