forked from OSchip/llvm-project
f202d32216
For instance: ``` func @for_yields_3(%lb : index, %ub : index, %step : index) -> (i32, i32, i32) { %a = call @make_i32() : () -> (i32) %b = call @make_i32() : () -> (i32) %r:3 = scf.for %i = %lb to %ub step %step iter_args(%0 = %a, %1 = %a, %2 = %b) -> (i32, i32, i32) { %c = call @make_i32() : () -> (i32) scf.yield %0, %c, %2 : i32, i32, i32 } return %r#0, %r#1, %r#2 : i32, i32, i32 } ``` Canonicalizes as: ``` func @for_yields_3(%arg0: index, %arg1: index, %arg2: index) -> (i32, i32, i32) { %0 = call @make_i32() : () -> i32 %1 = call @make_i32() : () -> i32 %2 = scf.for %arg3 = %arg0 to %arg1 step %arg2 iter_args(%arg4 = %0) -> (i32) { %3 = call @make_i32() : () -> i32 scf.yield %3 : i32 } return %0, %2, %1 : i32, i32, i32 } ``` Differential Revision: https://reviews.llvm.org/D90745 |
||
---|---|---|
.. | ||
cmake/modules | ||
docs | ||
examples | ||
include | ||
integration_test | ||
lib | ||
test | ||
tools | ||
unittests | ||
utils | ||
.clang-format | ||
.clang-tidy | ||
CMakeLists.txt | ||
LICENSE.TXT | ||
README.md |
README.md
Multi-Level Intermediate Representation
See https://mlir.llvm.org/ for more information.