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(%arg15: i32):
    "func.return"(%arg15) : (i32) -> ()
  }) : () -> ()
  "dataflow.thread"() <{domain = #dataflow.thread_domain<dense>, function_type = (index, memref<?xindex>) -> (), sym_name = "thread_0", sym_visibility = "private"}> ({
  ^bb0(%arg6: index, %arg7: memref<?xindex>, %arg8: none):
    "loom.spatial_region"(%arg6, %arg7) <{graph_name = "g_thread_0", operandSegmentSizes = array<i32: 1, 0, 1, 0>, resultSegmentSizes = array<i32: 0, 0>, source_maps = []}> ({
    ^bb0(%arg9: index, %arg10: memref<?xindex>):
      %6 = "arith.constant"() <{value = 0 : index}> : () -> index
      %7 = "arith.constant"() <{value = 1 : index}> : () -> index
      %8 = "arith.constant"() <{value = 2 : index}> : () -> index
      %9 = "arith.cmpi"(%6, %8) <{predicate = 6 : i64}> : (index, index) -> i1
      "scf.forall"() <{operandSegmentSizes = array<i32: 0, 0, 0, 0>, staticLowerBound = array<i64: 0>, staticStep = array<i64: 1>, staticUpperBound = array<i64: 2>}> ({
      ^bb0(%arg12: index):
        %14 = "arith.muli"(%6, %8) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
        %15 = "arith.addi"(%14, %arg12) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
        %16 = "scf.while"(%6) ({
        ^bb0(%arg14: index):
          %20 = "arith.cmpi"(%arg14, %8) <{predicate = 6 : i64}> : (index, index) -> i1
          "scf.condition"(%20, %arg14) : (i1, index) -> ()
        }, {
        ^bb0(%arg13: index):
          "memref.store"(%7, %arg10, %15) : (index, memref<?xindex>, index) -> ()
          "memref.store"(%7, %arg10, %15) : (index, memref<?xindex>, index) -> ()
          %19 = "arith.addi"(%arg13, %7) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
          "scf.yield"(%19) : (index) -> ()
        }) : (index) -> index
        %17 = "memref.load"(%arg10, %15) : (memref<?xindex>, index) -> index
        %18 = "arith.addi"(%17, %7) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
        "memref.store"(%18, %arg10, %15) : (index, memref<?xindex>, index) -> ()
        "scf.forall.in_parallel"() ({
        ^bb0:
        }) : () -> ()
      }) : () -> ()
      "scf.parallel"(%6, %8, %7) <{operandSegmentSizes = array<i32: 1, 1, 1, 0>}> ({
      ^bb0(%arg11: index):
        %10 = "arith.muli"(%6, %8) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
        %11 = "arith.addi"(%10, %arg11) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
        %12 = "memref.load"(%arg10, %11) : (memref<?xindex>, index) -> index
        %13 = "arith.addi"(%12, %7) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
        "memref.store"(%13, %arg10, %11) : (index, memref<?xindex>, index) -> ()
        "scf.reduce"() : () -> ()
      }) : (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(%arg5: index):
        "scf.if"(%3) ({
          "memref.store"(%1, %arg4, %0) : (index, memref<?xindex>, index) -> ()
          "scf.yield"() : () -> ()
        }, {
          %4 = "memref.load"(%arg4, %0) : (memref<?xindex>, index) -> index
          %5 = "arith.addi"(%4, %1) <{overflowFlags = #arith.overflow<none>}> : (index, index) -> index
          "memref.store"(%5, %arg4, %0) : (index, memref<?xindex>, index) -> ()
          "scf.yield"() : () -> ()
        }) : (i1) -> ()
        "scf.yield"() : () -> ()
      }) : (index, index, index) -> ()
      "loom.spatial_yield"() <{operandSegmentSizes = array<i32: 0, 0>}> : () -> ()
    }) : (index, memref<?xindex>) -> ()
    "dataflow.thread.yield"() : () -> ()
  }) : () -> ()
}) : () -> ()