Back to PBT run

input.generic.mlir

"builtin.module"() ({
  "llvm.func"() <{CConv = #llvm.cconv<ccc>, function_type = !llvm.func<i64 (i64)>, linkage = #llvm.linkage<external>, sym_name = "imported_callable", unnamed_addr = 0 : i64, visibility_ = 0 : i64}> ({
  }) : () -> ()
  "func.func"() <{function_type = (i32) -> i32, sym_name = "native_callable", sym_visibility = "private"}> ({
  ^bb0(%arg18: i32):
    "func.return"(%arg18) : (i32) -> ()
  }) : () -> ()
  "dataflow.thread"() <{domain = #dataflow.thread_domain<dense>, function_type = (index, memref<?xindex>) -> (), sym_name = "thread_0", sym_visibility = "private"}> ({
  ^bb0(%arg9: index, %arg10: memref<?xindex>, %arg11: none):
    "loom.spatial_region"(%arg9, %arg10) <{graph_name = "g_thread_0", operandSegmentSizes = array<i32: 1, 0, 1, 0>, resultSegmentSizes = array<i32: 0, 0>, source_maps = []}> ({
    ^bb0(%arg12: index, %arg13: memref<?xindex>):
      %17 = "arith.constant"() <{value = 0 : index}> : () -> index
      %18 = "arith.constant"() <{value = 1 : index}> : () -> index
      %19 = "arith.constant"() <{value = 2 : index}> : () -> index
      %20 = "arith.cmpi"(%17, %19) <{predicate = 6 : i64}> : (index, index) -> i1
      %21 = "scf.while"(%17) ({
      ^bb0(%arg17: index):
        %26 = "arith.cmpi"(%arg17, %19) <{predicate = 6 : i64}> : (index, index) -> i1
        "scf.condition"(%26, %arg17) : (i1, index) -> ()
      }, {
      ^bb0(%arg14: index):
        %22 = "scf.while"(%17) ({
        ^bb0(%arg16: index):
          %25 = "arith.cmpi"(%arg16, %19) <{predicate = 6 : i64}> : (index, index) -> i1
          "scf.condition"(%25, %arg16) : (i1, index) -> ()
        }, {
        ^bb0(%arg15: index):
          "memref.store"(%18, %arg13, %17) : (index, memref<?xindex>, index) -> ()
          "memref.store"(%18, %arg13, %17) : (index, memref<?xindex>, index) -> ()
          %24 = "arith.addi"(%arg15, %18) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
          "scf.yield"(%24) : (index) -> ()
        }) : (index) -> index
        %23 = "arith.addi"(%arg14, %18) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
        "scf.yield"(%23) : (index) -> ()
      }) : (index) -> index
      "loom.spatial_yield"() <{operandSegmentSizes = array<i32: 0, 0>}> : () -> ()
    }) : (index, memref<?xindex>) -> ()
    "dataflow.thread.yield"() : () -> ()
  }) : () -> ()
  "dataflow.thread"() <{domain = #dataflow.thread_domain<dense>, function_type = (index, memref<?xindex>) -> (), sym_name = "thread_1", sym_visibility = "private"}> ({
  ^bb0(%arg0: index, %arg1: memref<?xindex>, %arg2: none):
    "loom.spatial_region"(%arg0, %arg1) <{graph_name = "g_thread_1", operandSegmentSizes = array<i32: 1, 0, 1, 0>, resultSegmentSizes = array<i32: 0, 0>, source_maps = []}> ({
    ^bb0(%arg3: index, %arg4: memref<?xindex>):
      %0 = "arith.constant"() <{value = 0 : index}> : () -> index
      %1 = "arith.constant"() <{value = 1 : index}> : () -> index
      %2 = "arith.constant"() <{value = 2 : index}> : () -> index
      %3 = "arith.cmpi"(%0, %2) <{predicate = 6 : i64}> : (index, index) -> i1
      "scf.for"(%0, %2, %1) ({
      ^bb0(%arg6: index):
        %10 = "scf.while"(%0) ({
        ^bb0(%arg8: index):
          %16 = "arith.cmpi"(%arg8, %2) <{predicate = 6 : i64}> : (index, index) -> i1
          "scf.condition"(%16, %arg8) : (i1, index) -> ()
        }, {
        ^bb0(%arg7: index):
          %11 = "memref.load"(%arg4, %0) : (memref<?xindex>, index) -> index
          %12 = "arith.addi"(%11, %1) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
          "memref.store"(%12, %arg4, %0) : (index, memref<?xindex>, index) -> ()
          %13 = "memref.load"(%arg4, %0) : (memref<?xindex>, index) -> index
          %14 = "arith.addi"(%13, %1) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
          "memref.store"(%14, %arg4, %0) : (index, memref<?xindex>, index) -> ()
          %15 = "arith.addi"(%arg7, %1) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
          "scf.yield"(%15) : (index) -> ()
        }) : (index) -> index
        "scf.yield"() : () -> ()
      }) : (index, index, index) -> ()
      "scf.parallel"(%0, %2, %1) <{operandSegmentSizes = array<i32: 1, 1, 1, 0>}> ({
      ^bb0(%arg5: index):
        %4 = "arith.muli"(%0, %2) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
        %5 = "arith.addi"(%4, %arg5) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
        %6 = "memref.load"(%arg4, %5) : (memref<?xindex>, index) -> index
        %7 = "arith.addi"(%6, %1) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
        "memref.store"(%7, %arg4, %5) : (index, memref<?xindex>, index) -> ()
        %8 = "memref.load"(%arg4, %5) : (memref<?xindex>, index) -> index
        %9 = "arith.addi"(%8, %1) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
        "memref.store"(%9, %arg4, %5) : (index, memref<?xindex>, index) -> ()
        "scf.reduce"() : () -> ()
      }) : (index, index, index) -> ()
      "loom.spatial_yield"() <{operandSegmentSizes = array<i32: 0, 0>}> : () -> ()
    }) : (index, memref<?xindex>) -> ()
    "dataflow.thread.yield"() : () -> ()
  }) : () -> ()
}) : () -> ()