Back to PBT run
output.generic.mlir
"builtin.module"() ({
"dataflow.thread"() <{domain = #dataflow.thread_domain<dense>, function_type = (memref<4xi32>, i32, i1, index) -> (), sym_name = "thread_0", sym_visibility = "private"}> ({
^bb0(%arg29: memref<4xi32>, %arg30: i32, %arg31: i1, %arg32: index, %arg33: none):
%21 = "arith.constant"() <{value = 0 : index}> : () -> index
%22 = "arith.constant"() <{value = 1 : index}> : () -> index
%23 = "scf.for"(%21, %arg32, %22, %arg33) ({
^bb0(%arg36: index, %arg37: none):
%27 = "scf.if"(%arg31) ({
%28:2 = "dataflow.graph.launch"(%arg37, %arg30) <{callee = @graph_0_0, operandSegmentSizes = array<i32: 1, 1, 0, 0, 0>, resultSegmentSizes = array<i32: 1, 0, 1>, source_maps = []}> : (none, i32) -> (i32, none)
"scf.yield"(%28#1) : (none) -> ()
}, {
"scf.yield"(%arg37) : (none) -> ()
}) : (i1) -> none
"scf.yield"(%27) : (none) -> ()
}) : (index, index, index, none) -> none
%24 = "scf.for"(%21, %arg32, %22, %arg33) ({
^bb0(%arg34: index, %arg35: none):
%25 = "scf.if"(%arg31) ({
%26 = "dataflow.graph.launch"(%arg35, %arg30, %arg29) <{callee = @graph_0_1, operandSegmentSizes = array<i32: 1, 1, 0, 1, 0>, resultSegmentSizes = array<i32: 0, 0, 1>, source_maps = []}> : (none, i32, memref<4xi32>) -> none
"scf.yield"(%26) : (none) -> ()
}, {
"scf.yield"(%arg35) : (none) -> ()
}) : (i1) -> none
"scf.yield"(%25) : (none) -> ()
}) : (index, index, index, none) -> none
"dataflow.thread.yield"(%23, %24) : (none, none) -> ()
}) : () -> ()
"dataflow.thread"() <{domain = #dataflow.thread_domain<dense>, function_type = (memref<4xi32>, i32, i1, index) -> (), sym_name = "thread_1", sym_visibility = "private"}> ({
^bb0(%arg20: memref<4xi32>, %arg21: i32, %arg22: i1, %arg23: index, %arg24: none):
%15 = "arith.constant"() <{value = 0 : index}> : () -> index
%16 = "arith.constant"() <{value = 1 : index}> : () -> index
%17 = "scf.for"(%15, %arg23, %16, %arg24) ({
^bb0(%arg27: index, %arg28: none):
%20:2 = "dataflow.graph.launch"(%arg28, %arg21) <{callee = @graph_1_0, operandSegmentSizes = array<i32: 1, 1, 0, 0, 0>, resultSegmentSizes = array<i32: 1, 0, 1>, source_maps = []}> : (none, i32) -> (i32, none)
"scf.yield"(%20#1) : (none) -> ()
}) : (index, index, index, none) -> none
%18 = "scf.for"(%15, %arg23, %16, %arg24) ({
^bb0(%arg25: index, %arg26: none):
%19:2 = "dataflow.graph.launch"(%arg26, %arg21) <{callee = @graph_1_1, operandSegmentSizes = array<i32: 1, 1, 0, 0, 0>, resultSegmentSizes = array<i32: 1, 0, 1>, source_maps = []}> : (none, i32) -> (i32, none)
"scf.yield"(%19#1) : (none) -> ()
}) : (index, index, index, none) -> none
"dataflow.thread.yield"(%17, %18) : (none, none) -> ()
}) : () -> ()
"dataflow.thread"() <{domain = #dataflow.thread_domain<dense>, function_type = (memref<4xi32>, i32, i1, index) -> (), sym_name = "thread_2", sym_visibility = "private"}> ({
^bb0(%arg11: memref<4xi32>, %arg12: i32, %arg13: i1, %arg14: index, %arg15: none):
%8 = "arith.constant"() <{value = 0 : index}> : () -> index
%9 = "arith.constant"() <{value = 1 : index}> : () -> index
%10 = "scf.for"(%8, %arg14, %9, %arg15) ({
^bb0(%arg18: index, %arg19: none):
%14 = "dataflow.graph.launch"(%arg19) <{callee = @graph_2_0, operandSegmentSizes = array<i32: 1, 0, 0, 0, 0>, resultSegmentSizes = array<i32: 0, 0, 1>, source_maps = []}> : (none) -> none
"scf.yield"(%14) : (none) -> ()
}) : (index, index, index, none) -> none
%11 = "scf.for"(%8, %arg14, %9, %arg15) ({
^bb0(%arg16: index, %arg17: none):
%12 = "scf.if"(%arg13) ({
%13 = "dataflow.graph.launch"(%arg17) <{callee = @graph_2_1, operandSegmentSizes = array<i32: 1, 0, 0, 0, 0>, resultSegmentSizes = array<i32: 0, 0, 1>, source_maps = []}> : (none) -> none
"scf.yield"(%13) : (none) -> ()
}, {
"scf.yield"(%arg17) : (none) -> ()
}) : (i1) -> none
"scf.yield"(%12) : (none) -> ()
}) : (index, index, index, none) -> none
"dataflow.thread.yield"(%10, %11) : (none, none) -> ()
}) : () -> ()
"dataflow.graph"() <{function_type = (i32) -> i32, input_segments = array<i32: 1, 0, 0>, result_segments = array<i32: 1, 0, 0>, sym_name = "graph_0_0", sym_visibility = "private"}> ({
^bb0(%arg9: none, %arg10: i32):
%6 = "arith.addi"(%arg10, %arg10) <{overflowFlags = #arith.overflow<none>}> : (i32, i32) -> i32
%7:2 = "dataflow.sync"(%arg9, %6) : (none, i32) -> (none, i32)
"dataflow.graph.return"(%7#1, %7#0) <{operandSegmentSizes = array<i32: 1, 0, 0, 1>}> : (i32, 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_1", sym_visibility = "private"}> ({
^bb0(%arg6: none, %arg7: i32, %arg8: memref<4xi32>):
%4 = "dataflow.constant"(%arg6) <{const_value = 0 : index}> : (none) -> index
%5 = "dataflow.store"(%arg8, %4, %arg7, %arg6) : (memref<4xi32>, index, i32, none) -> none
"dataflow.graph.return"(%5) <{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_0", sym_visibility = "private"}> ({
^bb0(%arg4: none, %arg5: i32):
%2 = "arith.addi"(%arg5, %arg5) <{overflowFlags = #arith.overflow<none>}> : (i32, i32) -> i32
%3:2 = "dataflow.sync"(%arg4, %2) : (none, i32) -> (none, i32)
"dataflow.graph.return"(%3#1, %3#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: 1, 0, 0>, sym_name = "graph_1_1", sym_visibility = "private"}> ({
^bb0(%arg2: none, %arg3: i32):
%0 = "arith.addi"(%arg3, %arg3) <{overflowFlags = #arith.overflow<none>}> : (i32, i32) -> i32
%1:2 = "dataflow.sync"(%arg2, %0) : (none, i32) -> (none, i32)
"dataflow.graph.return"(%1#1, %1#0) <{operandSegmentSizes = array<i32: 1, 0, 0, 1>}> : (i32, none) -> ()
}) : () -> ()
"dataflow.graph"() <{function_type = () -> (), input_segments = array<i32: 0, 0, 0>, result_segments = array<i32: 0, 0, 0>, sym_name = "graph_2_0", sym_visibility = "private"}> ({
^bb0(%arg1: none):
"dataflow.graph.return"(%arg1) <{operandSegmentSizes = array<i32: 0, 0, 0, 1>}> : (none) -> ()
}) : () -> ()
"dataflow.graph"() <{function_type = () -> (), input_segments = array<i32: 0, 0, 0>, result_segments = array<i32: 0, 0, 0>, sym_name = "graph_2_1", sym_visibility = "private"}> ({
^bb0(%arg0: none):
"dataflow.graph.return"(%arg0) <{operandSegmentSizes = array<i32: 0, 0, 0, 1>}> : (none) -> ()
}) : () -> ()
}) : () -> ()