[all-commits] [llvm/llvm-project] bc7b26: [MLIR] Allow Loop dialect IfOp and ForOp to define...
Nagy Mostafa via All-commits
all-commits at lists.llvm.org
Fri Feb 21 10:07:17 PST 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: bc7b26c333f51b4b534abb81d597c0b86123718c
https://github.com/llvm/llvm-project/commit/bc7b26c333f51b4b534abb81d597c0b86123718c
Author: Nagy Mostafa <nagy.h.mostafa at intel.com>
Date: 2020-02-21 (Fri, 21 Feb 2020)
Changed paths:
M mlir/examples/toy/Ch6/mlir/LowerToLLVM.cpp
M mlir/examples/toy/Ch7/mlir/LowerToLLVM.cpp
M mlir/include/mlir/Dialect/LoopOps/LoopOps.td
M mlir/include/mlir/IR/OpImplementation.h
M mlir/lib/Conversion/AffineToStandard/AffineToStandard.cpp
M mlir/lib/Conversion/GPUToSPIRV/ConvertGPUToSPIRV.cpp
M mlir/lib/Dialect/LoopOps/LoopOps.cpp
M mlir/lib/Parser/Parser.cpp
M mlir/test/Conversion/LoopsToGPU/parallel_loop.mlir
M mlir/test/Dialect/Linalg/parallel_loops.mlir
M mlir/test/Dialect/Loops/invalid.mlir
M mlir/test/Dialect/Loops/ops.mlir
M mlir/test/Dialect/Loops/parallel-loop-fusion.mlir
Log Message:
-----------
[MLIR] Allow Loop dialect IfOp and ForOp to define values
This patch implements the RFCs proposed here:
https://llvm.discourse.group/t/rfc-modify-ifop-in-loop-dialect-to-yield-values/463
https://llvm.discourse.group/t/rfc-adding-operands-and-results-to-loop-for/459/19.
It introduces the following changes:
- All Loop Ops region, except for ReduceOp, terminate with a YieldOp.
- YieldOp can have variadice operands that is used to return values out of IfOp and ForOp regions.
- Change IfOp and ForOp syntax and representation to define values.
- Add unit-tests and update .td documentation.
- YieldOp is a terminator to loop.for/if/parallel
- YieldOp custom parser and printer
Lowering is not supported at the moment, and will be in a follow-up PR.
Thanks.
Reviewed By: bondhugula, nicolasvasilache, rriddle
Differential Revision: https://reviews.llvm.org/D74174
More information about the All-commits
mailing list