[Mlir-commits] [mlir] [mlir][RegionBranchOpInterface] explicitly check for existance of block terminator (PR #76831)
Maksim Levental
llvmlistbot at llvm.org
Thu Jan 4 07:43:42 PST 2024
makslevental wrote:
> I'm confused why is it valid to not have a terminator?
Quoting @ftynse who did the heavy lifting/thinking:
> It looks reasonably straightforward: NoTerminator means values cannot flow from terminator anywhere, which is what most users want from `RegionBranchTerminatorOpInterface`. It also has an additional method to determine the successor of the region, but there are only two possibilities: the region itself (loop-like) or the parent operation. This information is already available from RegionBranchOpInterface that has, for each region, the list of other regions that may follow. The only additional information that `RegionBranchTerminatorOpInterface` could provide is a definite choice of the region successor based on partially constant folded operands, but is meaningless as the absence of a terminator implies the absence of operands that may impact the control flow.
https://github.com/llvm/llvm-project/pull/76831
More information about the Mlir-commits
mailing list