[PATCH] D12847: Nit cleanup in LangRef about dereferenceable metadata

Vedant Kumar via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 16 23:12:59 PDT 2015


LGTM, thanks.

On Sep 14, 2015, at 9:52 AM, Artur Pilipenko via llvm-commits <llvm-commits at lists.llvm.org> wrote:

> apilipenko created this revision.
> apilipenko added a subscriber: llvm-commits.
> 
> http://reviews.llvm.org/D12847
> 
> Files:
>  docs/LangRef.rst
> 
> Index: docs/LangRef.rst
> ===================================================================
> --- docs/LangRef.rst
> +++ docs/LangRef.rst
> @@ -6768,9 +6768,10 @@
> 
> ::
> 
> -      <result> = load [volatile] <ty>, <ty>* <pointer>[, align <alignment>][, !nontemporal !<index>][, !invariant.load !<index>][, !nonnull !<index>][, !dereferenceable !<index>][, !dereferenceable_or_null !<index>]
> +      <result> = load [volatile] <ty>, <ty>* <pointer>[, align <alignment>][, !nontemporal !<index>][, !invariant.load !<index>][, !nonnull !<index>][, !dereferenceable !<deref_bytes_node>][, !dereferenceable_or_null !<deref_bytes_node>]
>       <result> = load atomic [volatile] <ty>* <pointer> [singlethread] <ordering>, align <alignment>
>       !<index> = !{ i32 1 }
> +      !<deref_bytes_node> = !{i64 <dereferenceable_bytes>}
> 
> Overview:
> """""""""
> @@ -6833,18 +6834,18 @@
> on parameters and return values. This metadata can only be applied
> to loads of a pointer type.
> 
> -The optional ``!dereferenceable`` metadata must reference a single
> -metadata name ``<index>`` corresponding to a metadata node with one ``i64``
> +The optional ``!dereferenceable`` metadata must reference a single metadata
> +name ``<deref_bytes_node>`` corresponding to a metadata node with one ``i64``
> entry. The existence of the ``!dereferenceable`` metadata on the instruction
> tells the optimizer that the value loaded is known to be dereferenceable.
> The number of bytes known to be dereferenceable is specified by the integer
> value in the metadata node. This is analogous to the ''dereferenceable''
> attribute on parameters and return values. This metadata can only be applied
> to loads of a pointer type.
> 
> The optional ``!dereferenceable_or_null`` metadata must reference a single
> -metadata name ``<index>`` corresponding to a metadata node with one ``i64``
> -entry. The existence of the ``!dereferenceable_or_null`` metadata on the
> +metadata name ``<deref_bytes_node>`` corresponding to a metadata node with one
> +``i64`` entry. The existence of the ``!dereferenceable_or_null`` metadata on the
> instruction tells the optimizer that the value loaded is known to be either
> dereferenceable or null.
> The number of bytes known to be dereferenceable is specified by the integer
> 
> 
> <D12847.34692.patch>_______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits



More information about the llvm-commits mailing list