summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorFrancis Visoiu Mistrih <francisvm@yahoo.com>2017-12-13 10:30:51 +0000
committerFrancis Visoiu Mistrih <francisvm@yahoo.com>2017-12-13 10:30:51 +0000
commit2b16863067fa1f188f616f80ab6ea23e7d1cb7c1 (patch)
tree83d8573492cd0e0f3dd8ff264794178bdfe1dd65 /docs
parentc84690975acd7c5f43e4c44d4653a9f7e384ba8f (diff)
[CodeGen] Print target index operands as target-index(target-specific) + 8 in both MIR and debug output
Work towards the unification of MIR and debug output by printing `target-index(target-specific) + 8` instead of `<ti#0+8>` and `target-index(target-specific) + 8` instead of `<ti#0-8>`. Only debug syntax is affected. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320565 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs')
-rw-r--r--docs/MIRLangRef.rst16
1 files changed, 15 insertions, 1 deletions
diff --git a/docs/MIRLangRef.rst b/docs/MIRLangRef.rst
index 82a61bcde86..b0e3984c338 100644
--- a/docs/MIRLangRef.rst
+++ b/docs/MIRLangRef.rst
@@ -615,6 +615,21 @@ If the identifier doesn't match the regular expression
The unnamed global values are represented using an unsigned numeric value with
the '@' prefix, like in the following examples: ``@0``, ``@989``.
+Target-dependent Index Operands
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+A target index operand is a target-specific index and an offset. The
+target-specific index is printed using target-specific names and a positive or
+negative offset.
+
+For example, the ``amdgpu-constdata-start`` is associated with the index ``0``
+in the AMDGPU backend. So if we have a target index operand with the index 0
+and the offset 8:
+
+.. code-block:: text
+
+ %sgpr2 = S_ADD_U32 _, target-index(amdgpu-constdata-start) + 8, implicit-def _, implicit-def _
+
.. TODO: Describe the parsers default behaviour when optional YAML attributes
are missing.
.. TODO: Describe the syntax for the bundled instructions.
@@ -631,6 +646,5 @@ the '@' prefix, like in the following examples: ``@0``, ``@989``.
.. TODO: Describe the syntax of the CFI index machine operands.
.. TODO: Describe the syntax of the metadata machine operands, and the
instructions debug location attribute.
-.. TODO: Describe the syntax of the target index machine operands.
.. TODO: Describe the syntax of the register live out machine operands.
.. TODO: Describe the syntax of the machine memory operands.