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