[PATCH] D31758: Invariant.group and mustalias docs fixes

Piotr Padlewski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 12 01:12:18 PDT 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL300033: Invariant.group and mustalias docs fixes (authored by Prazek).

Changed prior to commit:
  https://reviews.llvm.org/D31758?vs=94798&id=94940#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D31758

Files:
  llvm/trunk/docs/AliasAnalysis.rst
  llvm/trunk/docs/LangRef.rst


Index: llvm/trunk/docs/LangRef.rst
===================================================================
--- llvm/trunk/docs/LangRef.rst
+++ llvm/trunk/docs/LangRef.rst
@@ -5121,6 +5121,16 @@
    !0 = !{!"magic ptr"}
    !1 = !{!"other ptr"}
 
+The invariant.group metadata must be dropped when replacing one pointer by
+another based on aliasing information. This is because invariant.group is tied
+to the SSA value of the pointer operand.
+
+.. code-block:: llvm
+  %v = load i8, i8* %x, !invariant.group !0
+  ; if %x mustalias %y then we can replace the above instruction with
+  %v = load i8, i8* %y
+
+
 '``type``' Metadata
 ^^^^^^^^^^^^^^^^^^^
 
Index: llvm/trunk/docs/AliasAnalysis.rst
===================================================================
--- llvm/trunk/docs/AliasAnalysis.rst
+++ llvm/trunk/docs/AliasAnalysis.rst
@@ -136,7 +136,7 @@
 
 The ``MustAlias`` response may only be returned if the two memory objects are
 guaranteed to always start at exactly the same location. A ``MustAlias``
-response implies that the pointers compare equal.
+response does not imply that the pointers compare equal.
 
 The ``getModRefInfo`` methods
 -----------------------------


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31758.94940.patch
Type: text/x-patch
Size: 1185 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170412/c7c40bb0/attachment.bin>


More information about the llvm-commits mailing list