summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorSean Silva <silvas@purdue.edu>2013-05-20 23:31:12 +0000
committerSean Silva <silvas@purdue.edu>2013-05-20 23:31:12 +0000
commit57f429fcac5d3ade255611fd663b35101e3eb228 (patch)
tree4dba889bc5ffcace453d6a7a29d0eda7ccd50726 /docs
parent7b72cc7782716f469eb1b0963423a5b414215705 (diff)
downloadllvm-57f429fcac5d3ade255611fd663b35101e3eb228.tar.gz
llvm-57f429fcac5d3ade255611fd663b35101e3eb228.tar.bz2
llvm-57f429fcac5d3ade255611fd663b35101e3eb228.tar.xz
LangRef.rst: Clarify how basic blocks without named label are handled.
Describe that they are assigned numbered label using the same counter as for unnamed temporaries. Based on http://llvm.org/bugs/show_bug.cgi?id=16043 and mailing list discussion. Patch by Paul Sokolovsky! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182332 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs')
-rw-r--r--docs/LangRef.rst9
1 files changed, 7 insertions, 2 deletions
diff --git a/docs/LangRef.rst b/docs/LangRef.rst
index 4d006f135c..4eecd15a6f 100644
--- a/docs/LangRef.rst
+++ b/docs/LangRef.rst
@@ -127,7 +127,8 @@ lexical features of LLVM:
#. Comments are delimited with a '``;``' and go until the end of line.
#. Unnamed temporaries are created when the result of a computation is
not assigned to a named value.
-#. Unnamed temporaries are numbered sequentially
+#. Unnamed temporaries are numbered sequentially (using a per-function
+ incrementing counter, starting with 0).
It also shows a convention that we follow in this document. When
demonstrating instructions, we will follow an instruction with a comment
@@ -563,7 +564,11 @@ A function definition contains a list of basic blocks, forming the CFG
start with a label (giving the basic block a symbol table entry),
contains a list of instructions, and ends with a
:ref:`terminator <terminators>` instruction (such as a branch or function
-return).
+return). If explicit label is not provided, a block is assigned an
+implicit numbered label, using a next value from the same counter as used
+for unnamed temporaries (:ref:`see above<identifiers>`). For example, if a
+function entry block does not have explicit label, it will be assigned
+label "%0", then first unnamed temporary in that block will be "%1", etc.
The first basic block in a function is special in two ways: it is
immediately executed on entrance to the function, and it is not allowed