Back to PBT run

output.generic.mlir

#map = affine_map<() -> ()>
"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(%arg17: i32, %arg18: memref<4xi32>, %arg19: !dataflow.channel<i32>, %arg20: i1, %arg21: none):
    %17 = "arith.constant"() <{value = 0 : index}> : () -> index
    %18 = "arith.constant"() <{value = 1 : index}> : () -> index
    %19 = "arith.constant"() <{value = 4 : index}> : () -> index
    %20:2 = "dataflow.graph.launch"(%arg21, %arg17) <{callee = @graph_0, operandSegmentSizes = array<i32: 1, 1, 0, 0, 0>, resultSegmentSizes = array<i32: 1, 0, 1>, source_maps = []}> : (none, i32) -> (i32, none)
    "dataflow.thread.yield"(%20#1) : (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):
    %13 = "arith.constant"() <{value = 0 : index}> : () -> index
    %14 = "arith.constant"() <{value = 1 : index}> : () -> index
    %15 = "arith.constant"() <{value = 4 : index}> : () -> index
    %16:2 = "dataflow.graph.launch"(%arg16, %arg12) <{callee = @graph_1, operandSegmentSizes = array<i32: 1, 1, 0, 0, 0>, resultSegmentSizes = array<i32: 1, 0, 1>, source_maps = []}> : (none, i32) -> (i32, none)
    "dataflow.thread.yield"(%16#1) : (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):
    %9 = "arith.constant"() <{value = 0 : index}> : () -> index
    %10 = "arith.constant"() <{value = 1 : index}> : () -> index
    %11 = "arith.constant"() <{value = 4 : index}> : () -> index
    %12 = "dataflow.graph.launch"(%arg11, %arg9, %arg8) <{callee = @graph_2, operandSegmentSizes = array<i32: 1, 0, 1, 1, 0>, resultSegmentSizes = array<i32: 0, 0, 1>, source_maps = [#map]}> : (none, !dataflow.channel<i32>, memref<4xi32>) -> none
    "dataflow.thread.yield"(%12) : (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", sym_visibility = "private"}> ({
  ^bb0(%arg5: none, %arg6: i32):
    %7 = "arith.addi"(%arg6, %arg6) <{overflowFlags = #arith.overflow<none>}> : (i32, i32) -> i32
    %8:2 = "dataflow.sync"(%arg5, %7) : (none, i32) -> (none, i32)
    "dataflow.graph.return"(%8#1, %8#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", sym_visibility = "private"}> ({
  ^bb0(%arg3: none, %arg4: i32):
    %5 = "arith.addi"(%arg4, %arg4) <{overflowFlags = #arith.overflow<none>}> : (i32, i32) -> i32
    %6:2 = "dataflow.sync"(%arg3, %5) : (none, i32) -> (none, i32)
    "dataflow.graph.return"(%6#1, %6#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: 0, 1, 1>, result_segments = array<i32: 0, 0, 0>, sym_name = "graph_2", sym_visibility = "private"}> ({
  ^bb0(%arg0: none, %arg1: i32, %arg2: memref<4xi32>):
    %0 = "dataflow.constant"(%arg0) <{const_value = 0 : index}> : (none) -> index
    %1 = "dataflow.constant"(%arg0) <{const_value = true}> : (none) -> i1
    %2:2 = "dataflow.demux"(%1, %arg1) : (i1, i32) -> (i32, i32)
    %3:2 = "dataflow.sync"(%arg0, %2#1) : (none, i32) -> (none, i32)
    %4 = "dataflow.store"(%arg2, %0, %3#1, %3#0) : (memref<4xi32>, index, i32, none) -> none
    "dataflow.graph.return"(%4) <{operandSegmentSizes = array<i32: 0, 0, 0, 1>}> : (none) -> ()
  }) : () -> ()
}) : () -> ()