Improve terminator doc in MLIR LangRef
authorMehdi Amini <joker.eph@gmail.com>
Mon, 18 Apr 2022 18:43:25 +0000 (18:43 +0000)
committerMehdi Amini <joker.eph@gmail.com>
Mon, 18 Apr 2022 18:43:30 +0000 (18:43 +0000)
Reviewed By: rriddle, bondhugula

Differential Revision: https://reviews.llvm.org/D123886

mlir/docs/LangRef.md

index a876d7ee7b1888cd2afc8c012e2e83cd05554408..fad5b58f54b5b1601a07a1136f55a4b814c0310c 100644 (file)
@@ -366,11 +366,11 @@ compiler [basic block](https://en.wikipedia.org/wiki/Basic_block) where
 instructions inside the block are executed in order and terminator operations
 implement control flow branches between basic blocks.
 
-A region with a single block may not include a
-[terminator operation](#terminator-operations). The enclosing op can opt-out of
-this requirement with the `NoTerminator` trait. The top-level `ModuleOp` is an
-example of such operation which defined this trait and whose block body does not
-have a terminator.
+The last operation in a block must be a
+[terminator operation](#control-flow-and-ssacfg-regions). A region with a single
+block may opt out of this requirement by attaching the `NoTerminator` on the
+enclosing op. The top-level `ModuleOp` is an example of such an operation which
+defines this trait and whose block body does not have a terminator.
 
 Blocks in MLIR take a list of block arguments, notated in a function-like way.
 Block arguments are bound to values specified by the semantics of individual