Skip to content

Commit 9f35f74

Browse files
committed
remove more dead code
1 parent 651d82c commit 9f35f74

File tree

5 files changed

+13
-12
lines changed

5 files changed

+13
-12
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "LoopVectorization"
22
uuid = "bdcacae8-1622-11e9-2a5c-532679323890"
33
authors = ["Chris Elrod <[email protected]>"]
4-
version = "0.12.112"
4+
version = "0.12.113"
55

66
[deps]
77
ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"

src/codegen/lower_threads.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -463,8 +463,8 @@ function thread_one_loops_expr(
463463
push!(loopboundexpr.args, looprange)
464464
push!(lastboundexpr.args, lastrange)
465465
else
466-
loop_boundary!(loopboundexpr, ls, loop, true)
467-
loop_boundary!(lastboundexpr, ls, loop, true)
466+
loop_boundary!(loopboundexpr, loop, true)
467+
loop_boundary!(lastboundexpr, loop, true)
468468
end
469469
end
470470
avxcall_args = Expr(:tuple, lastboundexpr, Symbol("#vargs#"))
@@ -676,8 +676,8 @@ function thread_two_loops_expr(
676676
push!(loopboundexpr.args, looprange2)
677677
push!(lastboundexpr.args, lastrange2)
678678
else
679-
loop_boundary!(loopboundexpr, ls, loop, true)
680-
loop_boundary!(lastboundexpr, ls, loop, true)
679+
loop_boundary!(loopboundexpr, loop, true)
680+
loop_boundary!(lastboundexpr, loop, true)
681681
end
682682
end
683683
avxcall_args = Expr(:tuple, lastboundexpr, Symbol("#vargs#"))

src/codegen/split_loops.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@ function lower_and_split_loops(ls::LoopSet, inline::Int)
156156
order_2, unrolled_2, tiled_2, vectorized_2, U_2, T_2, cost_2, shouldinline_2 =
157157
choose_order_cost(ls_2)
158158
# U_1 = T_1 = U_2 = T_2 = 2
159-
# return ls_1, ls_2
160159
if cost_1 + cost_2 + looplenpen * (looplengthprod(ls_1) + looplengthprod(ls_2))
161160
muladd(0.9, cost_fused, ls_looplen)
162161
ls_2_lowered = if length(remaining_ops) > 1

src/condense_loopset.jl

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,6 @@ function OperationStruct!(
218218
ls::LoopSet,
219219
op::Operation,
220220
)
221-
instr = instruction(op)
222221
ld = loopdeps_uint(ls, op)
223222
rd = reduceddeps_uint(ls, op)
224223
cd = childdeps_uint(ls, op)
@@ -241,7 +240,7 @@ end
241240
@inline zerorangestart(r::ArrayInterface.OptionallyStaticUnitRange{StaticInt{1}}) =
242241
CloseOpen(maybestaticlast(r))
243242

244-
function loop_boundary!(q::Expr, ls::LoopSet, loop::Loop, shouldindbyind::Bool)
243+
function loop_boundary!(q::Expr, loop::Loop, shouldindbyind::Bool)
245244
if isstaticloop(loop) || loop.rangesym === Symbol("")
246245
call = Expr(:call, :(:))
247246
f = gethint(first(loop))
@@ -265,7 +264,7 @@ end
265264
function loop_boundaries(ls::LoopSet, shouldindbyind::Vector{Bool})
266265
lbd = Expr(:tuple)
267266
for (ibi, loop) zip(shouldindbyind, ls.loops)
268-
loop_boundary!(lbd, ls, loop, ibi)
267+
loop_boundary!(lbd, loop, ibi)
269268
end
270269
lbd
271270
end
@@ -770,8 +769,11 @@ function generate_call_types(
770769
ops = operations(ls)
771770
for op ops
772771
instr::Instruction = instruction(op)
773-
if ((isconstant(op) && (instr == LOOPCONSTANT)) && (!roots[identifier(op)]))
774-
instr = op.instruction = DROPPEDCONSTANT
772+
if (!roots[identifier(op)])
773+
if (isconstant(op) && (instr == LOOPCONSTANT)) || !isconstant(op)
774+
instr = op.instruction = DROPPEDCONSTANT
775+
op.node_type = constant
776+
end
775777
end
776778
push!(operation_descriptions.args, QuoteNode(instr.mod))
777779
push!(operation_descriptions.args, QuoteNode(instr.instr))

src/precompile.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2292,7 +2292,7 @@ function _precompile_()
22922292
Tuple{StaticInt{1},Int},
22932293
},
22942294
) # time: 0.001156726
2295-
Base.precompile(Tuple{typeof(loop_boundary!),Expr,LoopSet,Loop,Bool}) # time: 0.001152516
2295+
Base.precompile(Tuple{typeof(loop_boundary!),Expr,Loop,Bool}) # time: 0.001152516
22962296
Base.precompile(Tuple{typeof(maybestatic!),Expr}) # time: 0.001151616
22972297
Base.precompile(Tuple{typeof(tuple_expr),typeof(identity),Vector{Tuple{Int,NumberType}}}) # time: 0.001148223
22982298
Base.precompile(

0 commit comments

Comments
 (0)