From d244909b766b89096c616784cdca5ab4522bb0e0 Mon Sep 17 00:00:00 2001 From: Jay Foad Date: Wed, 3 Jun 2009 10:20:10 +0000 Subject: [PATCH] Document how phi and invoke instructions interact with SSA form. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72762 91177308-0d34-0410-b5e6-96231b3b80d8 --- docs/LangRef.html | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/docs/LangRef.html b/docs/LangRef.html index fb052d85eb3..5f23674b31b 100644 --- a/docs/LangRef.html +++ b/docs/LangRef.html @@ -2403,9 +2403,10 @@ cleanup is performed in the case of either a longjmp or a thrown exception. Additionally, this is important for implementation of 'catch' clauses in high-level languages that support them.

-

It is not valid to reference the return value of an invoke call from -anywhere not dominated by the normal label, since an unwind does not -provide a return value.

+

For the purposes of the SSA form, the definition of the value +returned by the 'invoke' instruction is deemed to occur on +the edge from the current block to the "normal" label. If the callee +unwinds then no return value is available.

Example:
@@ -4518,6 +4519,11 @@ may be used as the label arguments.

block and the PHI instructions: i.e. PHI instructions must be first in a basic block.

+

For the purposes of the SSA form, the use of each incoming value is +deemed to occur on the edge from the corresponding predecessor block +to the current block (but after any definition of an 'invoke' +instruction's return value on the same edge).

+
Semantics:

At runtime, the 'phi' instruction logically takes on the value