[mlir][SCF] Add an scf.take_assumed_branch transform op.
Given an scf.if conditional, using this transformation is akin to injecting user-specified information that it is always safe to execute only the specified `if` or `else` branch. This is achieved by just replacing the scf.if by the content of one of its branches. This is particularly useful for user-controlled rewriting of conditionals that exist solely to guard against out-of-bounds behavior. At the moment, no assume or assert operation is emitted as it is not always desirable. In the future, this may be controlled by a dedicated attribute. Differential Revision: https://reviews.llvm.org/D148125
Loading
Please sign in to comment