RegionBranchOpInterface did not allow the operation with regions to specify itself as successors. Therefore, this implied that the control is always transferred to a region before being transferred back to the parent op. Since the region can only transfer the control back to the parent op from a terminator, this transitively implied that the first block of any region with a RegionBranchOpInterface is always executed until the terminator can transfer the control flow back. This is trivially false for any conditional-like operation that may or may not execute the region, as well as for loop-like operations that may not execute the body. Remove the restriction from the interface description and update the only transform that relied on it. See https://discourse.llvm.org/t/rfc-region-control-flow-interfaces-should-encode-region-not-executed-correctly/72103. Depends On: https://reviews.llvm.org/D155757 Reviewed By: Mogball, springerm Differential Revision: https://reviews.llvm.org/D155822
6.1 KiB
6.1 KiB