diff --git a/mlir/docs/LangRef.md b/mlir/docs/LangRef.md --- a/mlir/docs/LangRef.md +++ b/mlir/docs/LangRef.md @@ -443,7 +443,8 @@ region is as follows: ``` -region ::= `{` block* `}` +region ::= `{` entry-block? block* `}` +entry-block ::= operation+ ``` A function body is an example of a region: it consists of a CFG of blocks and @@ -454,6 +455,11 @@ function arguments must match the types and count of the region arguments. In general, operations with regions can define these correspondences arbitrarily. +An *entry block* is a block with no label and no arguments that may occur at +the beginning of a region. It enables a common pattern of using a region to +open a new scope. + + ### Value Scoping Regions provide hierarchical encapsulation of programs: it is impossible to