Made it more explicit that the self-referential llvm.loop identifier metadata
authorPekka Jaaskelainen <pekka.jaaskelainen@tut.fi>
Fri, 22 Feb 2013 12:03:07 +0000 (12:03 +0000)
committerPekka Jaaskelainen <pekka.jaaskelainen@tut.fi>
Fri, 22 Feb 2013 12:03:07 +0000 (12:03 +0000)
should be unique for each loop.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175888 91177308-0d34-0410-b5e6-96231b3b80d8

docs/LangRef.rst

index c86309029eb601141cbd0218c098d4b527dad025..84680df731a984be35b2e56ef932a3852f88e7d7 100644 (file)
@@ -2537,11 +2537,17 @@ guaranteed to be separate for each loop. The loop-level metadata is prefixed
 with ``llvm.loop``.
 
 The loop identifier metadata is implemented using a metadata that refers to
-itself as follows:
+itself to avoid merging it with any other identifier metadata, e.g., 
+during module linkage or function inlining. That is, each loop should refer 
+to their own identification metadata even if they reside in separate functions. 
+The following example contains loop identifier metadata for two separate loop 
+constructs:
 
 .. code-block:: llvm
 
     !0 = metadata !{ metadata !0 }
+    !1 = metadata !{ metadata !1 }
+
 
 '``llvm.loop.parallel``' Metadata
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^