[PATCH] Add support for nonnull metadata on Loads

hfinkel at anl.gov hfinkel at anl.gov
Thu Sep 18 12:03:33 PDT 2014


Also, if I might engage in some bikeshedding, I'd prefer that we name this something other than just nonnull, because I'd like to make it more clear that this refers to the value being returned from the load and not the pointer from which the value is being loaded. Maybe result.nonnull or value.nonnull or similar?

================
Comment at: docs/LangRef.rst:5223
@@ +5222,3 @@
+pointer type.  The value of the metadata node pointed to by 
+''<index'' is unspecified and meaningless.
+
----------------
I'd prefer to specify this in the same way that !invariant.load is specified. It says:

  The optional ``!invariant.load`` metadata must reference a single
  metadata name ``<index>`` corresponding to a metadata node with no 
  entries. The existence of the ``!invariant.load`` metadata on the
  instruction tells the optimizer...

I'd like to use similar terminology here to talk about what the referenced metadata should be (instead of saying unspecified and meaningless).

http://reviews.llvm.org/D5220






More information about the llvm-commits mailing list