Add note to documentation about machine node chains.
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Tue, 2 Sep 2014 19:18:52 +0000 (19:18 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Tue, 2 Sep 2014 19:18:52 +0000 (19:18 +0000)
I've been assuming chain operands were always the first operand,
since the documentation says this. I was confused about why they
were missing after instruction selection. Apparently the convention
changes to using the last operand for MachineSDNodes and I've never
noticed before.

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

docs/CodeGenerator.rst

index 5736e4378d72f5d220b9ecdc0180c044967ce85a..facedc32a4f7f8bf7dba0459623a10f7176c447e 100644 (file)
@@ -769,7 +769,9 @@ provide an ordering between nodes that have side effects (such as loads, stores,
 calls, returns, etc).  All nodes that have side effects should take a token
 chain as input and produce a new one as output.  By convention, token chain
 inputs are always operand #0, and chain results are always the last value
-produced by an operation.
+produced by an operation. However, after instruction selection, the
+machine nodes have their chain after the instruction's operands, and
+may be followed by glue nodes.
 
 A SelectionDAG has designated "Entry" and "Root" nodes.  The Entry node is
 always a marker node with an Opcode of ``ISD::EntryToken``.  The Root node is