tensorflow / mlir

"Multi-Level Intermediate Representation" Compiler Infrastructure
1.73k stars 257 forks source link

Free ReturnOp from being restricted to a FuncOp #330

Closed bondhugula closed 4 years ago

bondhugula commented 4 years ago

This allows std.return to be used both in a declarative (FuncOp) as well as an imperative (typical op) setting --- avoiding the need to create custom return ops for what is standard, in cases where control is to be transferred to the enclosing operation, and return values need to be modeled in ops with regions.

This also enables affine.graybox to hold a list of blocks with terminators.

Signed-off-by: Uday Bondhugula uday@polymagelabs.com

bondhugula commented 4 years ago

This was moved to MLIR in LLVM project.