Back to PBT run
output.generic.mlir
"builtin.module"() ({
"func.func"() <{function_type = (i32) -> i32, sym_name = "helper_double"}> ({
^bb0(%arg11: i32):
%30 = "arith.addi"(%arg11, %arg11) <{overflowFlags = #arith.overflow<none>}> : (i32, i32) -> i32
"func.return"(%30) : (i32) -> ()
}) : () -> ()
"llvm.func"() <{CConv = #llvm.cconv<ccc>, function_type = !llvm.func<i32 (i32)>, linkage = #llvm.linkage<external>, sym_name = "extern_scale", unnamed_addr = 0 : i64, visibility_ = 0 : i64}> ({
}) : () -> ()
"func.func"() <{function_type = (memref<4xi32>, i32) -> (), sym_name = "host_container"}> ({
^bb0(%arg8: memref<4xi32>, %arg9: i32):
%27 = "arith.constant"() <{value = 0 : index}> : () -> index
%28 = "arith.constant"() <{value = 4 : index}> : () -> index
%29 = "arith.constant"() <{value = 1 : index}> : () -> index
"scf.for"(%27, %28, %29) ({
^bb0(%arg10: index):
"memref.store"(%arg9, %arg8, %arg10) : (i32, memref<4xi32>, index) -> ()
"scf.yield"() : () -> ()
}) : (index, index, index) -> ()
"func.return"() : () -> ()
}) : () -> ()
"dataflow.thread"() <{domain = #dataflow.thread_domain<dense>, function_type = (memref<4xi32>, i32, i1) -> (), sym_name = "thread_0", sym_visibility = "private"}> ({
^bb0(%arg4: memref<4xi32>, %arg5: i32, %arg6: i1, %arg7: none):
%22 = "arith.constant"() <{value = 0 : index}> : () -> index
%23 = "arith.constant"() <{value = 2 : index}> : () -> index
%24 = "arith.constant"() <{value = 1 : index}> : () -> index
%25:2 = "dataflow.graph.launch"(%arg7, %arg5) <{callee = @graph_0, operandSegmentSizes = array<i32: 1, 1, 0, 0, 0>, resultSegmentSizes = array<i32: 1, 0, 1>, source_maps = []}> : (none, i32) -> (i32, none)
%26:2 = "dataflow.graph.launch"(%arg7, %arg5) <{callee = @graph_1, operandSegmentSizes = array<i32: 1, 1, 0, 0, 0>, resultSegmentSizes = array<i32: 1, 0, 1>, source_maps = []}> : (none, i32) -> (i32, none)
"dataflow.thread.yield"(%25#1, %26#1) : (none, none) -> ()
}) : () -> ()
"dataflow.graph"() <{function_type = (i32) -> i32, input_segments = array<i32: 1, 0, 0>, result_segments = array<i32: 1, 0, 0>, sym_name = "graph_0", sym_visibility = "private"}> ({
^bb0(%arg2: none, %arg3: i32):
%20 = "llvm.freeze"(%arg3) : (i32) -> i32
%21:2 = "dataflow.sync"(%arg2, %20) : (none, i32) -> (none, i32)
"dataflow.graph.return"(%21#1, %21#0) <{operandSegmentSizes = array<i32: 1, 0, 0, 1>}> : (i32, none) -> ()
}) : () -> ()
"dataflow.graph"() <{function_type = (i32) -> i32, input_segments = array<i32: 1, 0, 0>, result_segments = array<i32: 1, 0, 0>, sym_name = "graph_1", sym_visibility = "private"}> ({
^bb0(%arg0: none, %arg1: i32):
%0 = "dataflow.constant"(%arg0) <{const_value = 0 : index}> : (none) -> index
%1 = "dataflow.constant"(%arg0) <{const_value = 2 : index}> : (none) -> index
%2 = "dataflow.constant"(%arg0) <{const_value = 1 : index}> : (none) -> index
%3 = "arith.index_cast"(%0) : (index) -> i32
%4 = "arith.index_cast"(%1) : (index) -> i32
%5 = "arith.index_cast"(%2) : (index) -> i32
%6:2 = "dataflow.stream"(%3, %4, %5) <{predicate = 2 : i64, step_kind = 0 : i32}> : (i32, i32, i32) -> (i32, i1)
%7 = "dataflow.carry"(%6#1, %arg0, %8#1) : (i1, none, none) -> none
%8:2 = "dataflow.demux"(%6#1, %7) : (i1, none) -> (none, none)
%9 = "dataflow.carry"(%6#1, %arg1, %14) : (i1, i32, i32) -> i32
%10:2 = "dataflow.demux"(%6#1, %9) : (i1, i32) -> (i32, i32)
%11 = "dataflow.invariant"(%6#1, %arg1) : (i1, i32) -> i32
%12:2 = "dataflow.gate"(%6#1, %11) : (i1, i32) -> (i1, i32)
%13:2 = "dataflow.demux"(%12#0, %12#1) : (i1, i32) -> (i32, i32)
%14 = "arith.addi"(%10#1, %12#1) <{overflowFlags = #arith.overflow<none>}> : (i32, i32) -> i32
%15 = "arith.cmpi"(%3, %4) <{predicate = 2 : i64}> : (i32, i32) -> i1
%16:2 = "dataflow.demux"(%15, %8#0) : (i1, none) -> (none, none)
%17:2 = "dataflow.sync"(%16#1, %13#0) : (none, i32) -> (none, i32)
%18 = "dataflow.mux"(%15, %16#0, %17#0) : (i1, none, none) -> none
%19:2 = "dataflow.sync"(%18, %10#0) : (none, i32) -> (none, i32)
"dataflow.graph.return"(%19#1, %19#0) <{operandSegmentSizes = array<i32: 1, 0, 0, 1>}> : (i32, none) -> ()
}) : () -> ()
}) : () -> ()