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 = "dataflow.graph.launch"(%arg33, %arg30, %arg29) <{callee = @graph_0_0, operandSegmentSizes = array<i32: 1, 1, 0, 1, 0>, resultSegmentSizes = array<i32: 0, 0, 1>, source_maps = []}> : (none, i32, memref<4xi32>) -> none
    "dataflow.thread.yield"(%23) : (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):
    %14 = "arith.constant"() <{value = 0 : index}> : () -> index
    %15 = "arith.constant"() <{value = 1 : index}> : () -> index
    %16 = "scf.for"(%14, %arg23, %15, %arg24) ({
    ^bb0(%arg27: index, %arg28: none):
      %20 = "dataflow.graph.launch"(%arg28, %arg21, %arg20) <{callee = @graph_1_0, operandSegmentSizes = array<i32: 1, 1, 0, 1, 0>, resultSegmentSizes = array<i32: 0, 0, 1>, source_maps = []}> : (none, i32, memref<4xi32>) -> none
      "scf.yield"(%20) : (none) -> ()
    }) : (index, index, index, none) -> none
    %17 = "scf.for"(%14, %arg23, %15, %arg24) ({
    ^bb0(%arg25: index, %arg26: none):
      %18 = "scf.if"(%arg22) ({
        %19 = "dataflow.graph.launch"(%arg26, %arg21, %arg20) <{callee = @graph_1_1, 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) -> ()
      }, {
        "scf.yield"(%arg26) : (none) -> ()
      }) : (i1) -> none
      "scf.yield"(%18) : (none) -> ()
    }) : (index, index, index, none) -> none
    "dataflow.thread.yield"(%16, %17) : (none, none) -> ()
  }) : () -> ()
  "dataflow.thread"() <{domain = #dataflow.thread_domain<dense>, function_type = (memref<4xi32>, i32, i1, index) -> (), sym_name = "thread_2", sym_visibility = "private"}> ({
  ^bb0(%arg13: memref<4xi32>, %arg14: i32, %arg15: i1, %arg16: index, %arg17: none):
    %8 = "arith.constant"() <{value = 0 : index}> : () -> index
    %9 = "arith.constant"() <{value = 1 : index}> : () -> index
    %10 = "scf.for"(%8, %arg16, %9, %arg17) ({
    ^bb0(%arg18: index, %arg19: none):
      %13 = "dataflow.graph.launch"(%arg19, %arg14, %arg13) <{callee = @graph_2_0, operandSegmentSizes = array<i32: 1, 1, 0, 1, 0>, resultSegmentSizes = array<i32: 0, 0, 1>, source_maps = []}> : (none, i32, memref<4xi32>) -> none
      "scf.yield"(%13) : (none) -> ()
    }) : (index, index, index, none) -> none
    %11 = "scf.if"(%arg15) ({
      %12 = "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"(%12) : (none) -> ()
    }, {
      "scf.yield"(%arg17) : (none) -> ()
    }) : (i1) -> none
    "dataflow.thread.yield"(%10, %11) : (none, 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_0", sym_visibility = "private"}> ({
  ^bb0(%arg10: none, %arg11: i32, %arg12: memref<4xi32>):
    %6 = "dataflow.constant"(%arg10) <{const_value = 0 : index}> : (none) -> index
    %7 = "dataflow.store"(%arg12, %6, %arg11, %arg10) : (memref<4xi32>, index, i32, none) -> none
    "dataflow.graph.return"(%7) <{operandSegmentSizes = array<i32: 0, 0, 0, 1>}> : (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_1_0", sym_visibility = "private"}> ({
  ^bb0(%arg7: none, %arg8: i32, %arg9: memref<4xi32>):
    %4 = "dataflow.constant"(%arg7) <{const_value = 0 : index}> : (none) -> index
    %5 = "dataflow.store"(%arg9, %4, %arg8, %arg7) : (memref<4xi32>, index, i32, none) -> none
    "dataflow.graph.return"(%5) <{operandSegmentSizes = array<i32: 0, 0, 0, 1>}> : (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_1_1", sym_visibility = "private"}> ({
  ^bb0(%arg4: none, %arg5: i32, %arg6: memref<4xi32>):
    %2 = "dataflow.constant"(%arg4) <{const_value = 0 : index}> : (none) -> index
    %3 = "dataflow.store"(%arg6, %2, %arg5, %arg4) : (memref<4xi32>, index, i32, none) -> none
    "dataflow.graph.return"(%3) <{operandSegmentSizes = array<i32: 0, 0, 0, 1>}> : (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_2_0", sym_visibility = "private"}> ({
  ^bb0(%arg1: none, %arg2: i32, %arg3: memref<4xi32>):
    %0 = "dataflow.constant"(%arg1) <{const_value = 0 : index}> : (none) -> index
    %1 = "dataflow.store"(%arg3, %0, %arg2, %arg1) : (memref<4xi32>, index, i32, none) -> none
    "dataflow.graph.return"(%1) <{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) -> ()
  }) : () -> ()
}) : () -> ()