Back to PBT run
output.generic.mlir
"builtin.module"() ({
"dataflow.thread"() <{domain = #dataflow.thread_domain<dense>, function_type = (i32, memref<4xi32>, !dataflow.channel<i32>, i1) -> (), sym_name = "thread_0", sym_visibility = "private"}> ({
^bb0(%arg19: i32, %arg20: memref<4xi32>, %arg21: !dataflow.channel<i32>, %arg22: i1, %arg23: none):
%15 = "arith.constant"() <{value = 0 : index}> : () -> index
%16 = "arith.constant"() <{value = 1 : index}> : () -> index
%17 = "arith.constant"() <{value = 4 : index}> : () -> index
%18 = "scf.for"(%15, %17, %16, %arg23) ({
^bb0(%arg24: index, %arg25: none):
%19 = "dataflow.graph.launch"(%arg25, %arg19, %arg20) <{callee = @graph_0, operandSegmentSizes = array<i32: 1, 1, 0, 1, 0>, resultSegmentSizes = array<i32: 0, 0, 1>, source_maps = []}> : (none, i32, memref<4xi32>) -> none
"scf.yield"(%19) : (none) -> ()
}) : (index, index, index, none) -> none
"dataflow.thread.yield"(%18) : (none) -> ()
}) : () -> ()
"dataflow.thread"() <{domain = #dataflow.thread_domain<dense>, function_type = (i32, memref<4xi32>, !dataflow.channel<i32>, i1) -> (), sym_name = "thread_1", sym_visibility = "private"}> ({
^bb0(%arg12: i32, %arg13: memref<4xi32>, %arg14: !dataflow.channel<i32>, %arg15: i1, %arg16: none):
%9 = "arith.constant"() <{value = 0 : index}> : () -> index
%10 = "arith.constant"() <{value = 1 : index}> : () -> index
%11 = "arith.constant"() <{value = 4 : index}> : () -> index
%12 = "scf.for"(%9, %11, %10, %arg16) ({
^bb0(%arg17: index, %arg18: none):
%13 = "scf.if"(%arg15) ({
%14:2 = "dataflow.graph.launch"(%arg18, %arg12) <{callee = @graph_1, operandSegmentSizes = array<i32: 1, 1, 0, 0, 0>, resultSegmentSizes = array<i32: 1, 0, 1>, source_maps = []}> : (none, i32) -> (i32, none)
"scf.yield"(%14#1) : (none) -> ()
}, {
"scf.yield"(%arg18) : (none) -> ()
}) : (i1) -> none
"scf.yield"(%13) : (none) -> ()
}) : (index, index, index, none) -> none
"dataflow.thread.yield"(%12) : (none) -> ()
}) : () -> ()
"dataflow.thread"() <{domain = #dataflow.thread_domain<dense>, function_type = (i32, memref<4xi32>, !dataflow.channel<i32>, i1) -> (), sym_name = "thread_2", sym_visibility = "private"}> ({
^bb0(%arg7: i32, %arg8: memref<4xi32>, %arg9: !dataflow.channel<i32>, %arg10: i1, %arg11: none):
%5 = "arith.constant"() <{value = 0 : index}> : () -> index
%6 = "arith.constant"() <{value = 1 : index}> : () -> index
%7 = "arith.constant"() <{value = 4 : index}> : () -> index
%8 = "dataflow.graph.launch"(%arg11, %arg7, %arg9) <{callee = @graph_2, operandSegmentSizes = array<i32: 1, 1, 0, 0, 1>, resultSegmentSizes = array<i32: 0, 0, 1>, source_maps = []}> : (none, i32, !dataflow.channel<i32>) -> none
"dataflow.thread.yield"(%8) : (none) -> ()
}) : () -> ()
"dataflow.graph"() <{arg_attrs = [{}, {llvm.noalias}], function_type = (i32, memref<4xi32>) -> (), input_segments = array<i32: 1, 0, 1>, result_segments = array<i32: 0, 0, 0>, sym_name = "graph_0", sym_visibility = "private"}> ({
^bb0(%arg4: none, %arg5: i32, %arg6: memref<4xi32>):
%3 = "dataflow.constant"(%arg4) <{const_value = 0 : index}> : (none) -> index
%4 = "dataflow.store"(%arg6, %3, %arg5, %arg4) : (memref<4xi32>, index, i32, none) -> none
"dataflow.graph.return"(%4) <{operandSegmentSizes = array<i32: 0, 0, 0, 1>}> : (none) -> ()
}) : () -> ()
"dataflow.graph"() <{function_type = (i32) -> i32, input_segments = array<i32: 1, 0, 0>, result_segments = array<i32: 1, 0, 0>, sym_name = "graph_1", sym_visibility = "private"}> ({
^bb0(%arg2: none, %arg3: i32):
%1 = "arith.addi"(%arg3, %arg3) <{overflowFlags = #arith.overflow<none>}> : (i32, i32) -> i32
%2:2 = "dataflow.sync"(%arg2, %1) : (none, i32) -> (none, i32)
"dataflow.graph.return"(%2#1, %2#0) <{operandSegmentSizes = array<i32: 1, 0, 0, 1>}> : (i32, none) -> ()
}) : () -> ()
"dataflow.graph"() <{function_type = (i32) -> i32, input_segments = array<i32: 1, 0, 0>, result_segments = array<i32: 0, 1, 0>, sym_name = "graph_2", sym_visibility = "private"}> ({
^bb0(%arg0: none, %arg1: i32):
%0:2 = "dataflow.sync"(%arg0, %arg1) : (none, i32) -> (none, i32)
"dataflow.graph.return"(%0#1, %0#0) <{operandSegmentSizes = array<i32: 0, 1, 0, 1>}> : (i32, none) -> ()
}) : () -> ()
}) : () -> ()