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