mirror of
https://github.com/intel/llvm.git
synced 2026-01-25 19:44:38 +08:00
The ForOp::build ensures that there is a block terminator which is great for the default use case when there are no iter_args and loop.for returns no results. In non-zero results case we always need to call replaceOpWithNewOp which is not the nicest thing in the world. We can stop inserting YieldOp when iter_args is non-empty. IfOp::build already behaves similarly.
Multi-Level Intermediate Representation
See https://mlir.llvm.org/ for more information.