@@ -5,6 +5,21 @@ function add_operation!(ls_new::LoopSet, included::Vector{Int}, ls::LoopSet, op:
5
5
iszero (newid) || return operations (ls_new)[newid]
6
6
vparents = Operation[]
7
7
for opp ∈ parents (op)
8
+ # TODO : get it so that
9
+ # a[i] = f(a[i]) will split into one loop computing and storing f(a[i]), and the other loading from that storage if it needs it.
10
+ # if iscompute(opp) && (!isstore(op)) # search for stores
11
+ # found = false
12
+ # for oppp ∈ operations(ls)
13
+ # isstore(oppp) || continue
14
+ # if first(parents(oppp)) === op
15
+ # found = true
16
+
17
+ # push!(vparents, add_operation!(ls_new, included, ls, opppp))
18
+ # break
19
+ # end
20
+ # end
21
+ # found && continue
22
+ # end
8
23
push! (vparents, add_operation! (ls_new, included, ls, opp))
9
24
end
10
25
opnew = Operation (
@@ -84,7 +99,7 @@ function lower_and_split_loops(ls::LoopSet, inline::Int)
84
99
order_2, unrolled_2, tiled_2, vectorized_2, U_2, T_2, cost_2, shouldinline_2 = choose_order_cost (ls_2)
85
100
# U_1 = T_1 = U_2 = T_2 = 2
86
101
if cost_1 + cost_2 ≤ cost_fused
87
- # @show cost_1, cost_2 cost_fused
102
+ @show cost_1, cost_2 cost_fused
88
103
ls_2_lowered = if length (remaining_ops) > 1
89
104
inline = iszero (inline) ? (shouldinline_1 % Int) : inline
90
105
lower_and_split_loops (ls_2, inline)
0 commit comments