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