Back to PBT run

input.generic.mlir

"builtin.module"() ({
  "func.func"() <{function_type = (index) -> index, sym_name = "native_helper"}> ({
  ^bb0(%arg20: index):
    "func.return"(%arg20) : (index) -> ()
  }) : () -> ()
  "dataflow.thread"() <{domain = #dataflow.thread_domain<dense>, function_type = (memref<8xindex>, memref<8xindex>, memref<4x4xindex>, index) -> (), sym_name = "t0", sym_visibility = "private"}> ({
  ^bb0(%arg9: memref<8xindex>, %arg10: memref<8xindex>, %arg11: memref<4x4xindex>, %arg12: index, %arg13: none):
    %5 = "arith.constant"() <{value = 0 : index}> : () -> index
    %6 = "arith.constant"() <{value = 3 : index}> : () -> index
    "memref.store"(%6, %arg9, %5) : (index, memref<8xindex>, index) -> ()
    "loom.spatial_region"(%arg12, %arg10, %arg11) <{graph_name = "g_t0_0", operandSegmentSizes = array<i32: 1, 0, 2, 0>, resultSegmentSizes = array<i32: 0, 0>, source_maps = []}> ({
    ^bb0(%arg14: index, %arg15: memref<8xindex>, %arg16: memref<4x4xindex>):
      %7 = "arith.constant"() <{value = 0 : index}> : () -> index
      %8 = "arith.constant"() <{value = 1 : index}> : () -> index
      %9 = "arith.constant"() <{value = 2 : index}> : () -> index
      %10 = "arith.constant"() <{value = 7 : index}> : () -> index
      "scf.forall"() <{operandSegmentSizes = array<i32: 0, 0, 0, 0>, staticLowerBound = array<i64: 0>, staticStep = array<i64: 1>, staticUpperBound = array<i64: 2>}> ({
      ^bb0(%arg17: index):
        %11 = "scf.while"(%7) ({
        ^bb0(%arg19: index):
          %13 = "arith.cmpi"(%arg19, %arg14) <{predicate = 2 : i64}> : (index, index) -> i1
          "scf.condition"(%13, %arg19) : (i1, index) -> ()
        }, {
        ^bb0(%arg18: index):
          %12 = "arith.addi"(%arg18, %8) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
          "scf.yield"(%12) : (index) -> ()
        }) : (index) -> index
        "memref.store"(%11, %arg15, %arg17) : (index, memref<8xindex>, index) -> ()
        "scf.forall.in_parallel"() ({
        ^bb0:
        }) : () -> ()
      }) : () -> ()
      "loom.spatial_yield"() <{operandSegmentSizes = array<i32: 0, 0>}> : () -> ()
    }) : (index, memref<8xindex>, memref<4x4xindex>) -> ()
    "dataflow.thread.yield"() : () -> ()
  }) : () -> ()
  "dataflow.thread"() <{domain = #dataflow.thread_domain<dense>, function_type = (memref<8xindex>, memref<8xindex>, memref<4x4xindex>, index) -> (), sym_name = "t1", sym_visibility = "private"}> ({
  ^bb0(%arg0: memref<8xindex>, %arg1: memref<8xindex>, %arg2: memref<4x4xindex>, %arg3: index, %arg4: none):
    "loom.spatial_region"(%arg3, %arg1, %arg2) <{graph_name = "g_t1_0", operandSegmentSizes = array<i32: 1, 0, 2, 0>, resultSegmentSizes = array<i32: 0, 0>, source_maps = []}> ({
    ^bb0(%arg5: index, %arg6: memref<8xindex>, %arg7: memref<4x4xindex>):
      %0 = "arith.constant"() <{value = 0 : index}> : () -> index
      %1 = "arith.constant"() <{value = 1 : index}> : () -> index
      %2 = "arith.constant"() <{value = 2 : index}> : () -> index
      %3 = "arith.constant"() <{value = 7 : index}> : () -> index
      %4 = "arith.cmpi"(%0, %arg5) <{predicate = 2 : i64}> : (index, index) -> i1
      "scf.if"(%4) ({
        "scf.parallel"(%0, %2, %1) <{operandSegmentSizes = array<i32: 1, 1, 1, 0>}> ({
        ^bb0(%arg8: index):
          "memref.store"(%3, %arg6, %arg8) : (index, memref<8xindex>, index) -> ()
          "scf.reduce"() : () -> ()
        }) : (index, index, index) -> ()
        "scf.yield"() : () -> ()
      }, {
      }) : (i1) -> ()
      "loom.spatial_yield"() <{operandSegmentSizes = array<i32: 0, 0>}> : () -> ()
    }) : (index, memref<8xindex>, memref<4x4xindex>) -> ()
    "dataflow.thread.yield"() : () -> ()
  }) : () -> ()
}) : () -> ()