mirror of
https://github.com/llvm/llvm-project.git
synced 2025-05-02 02:46:07 +00:00

Originally, the SCFToStandard conversion only declared Ops from the Standard dialect as legal after conversion. This is undesirable as it would fail the conversion if the SCF ops contained ops from any other dialect. Furthermore, this would be problematic for progressive lowering of `scf.parallel` to `scf.for` after `ensureRegionTerminator` is made aware of the pattern rewriting infrastructure because it creates temporary `scf.yield` operations declared illegal. Change the legalization target to declare any op other than `scf.for`, `scf.if` and `scf.parallel` legal. Differential Revision: https://reviews.llvm.org/D80137