1
1
function Loop (ls:: LoopSet , l:: Int , :: Type{UnitRange{Int}} )
2
2
start = gensym (:loopstart ); stop = gensym (:loopstop )
3
- pushpreamble! (ls, Expr (:(= ), start, Expr (:macrocall , Symbol (" @inbounds" ), LineNumberNode (@__LINE__ , @__FILE__ ), Expr (:(.), Expr (:ref , :lb , l), QuoteNode (:start )))))
4
- pushpreamble! (ls, Expr (:(= ), stop, Expr (:macrocall , Symbol (" @inbounds" ), LineNumberNode (@__LINE__ , @__FILE__ ), Expr (:(.), Expr (:ref , :lb , l), QuoteNode (:stop )))))
3
+ pushpreamble! (ls, Expr (:(= ), start, Expr (:macrocall , Symbol (" @inbounds" ), LineNumberNode (@__LINE__ , Symbol ( @__FILE__ ) ), Expr (:(.), Expr (:ref , :lb , l), QuoteNode (:start )))))
4
+ pushpreamble! (ls, Expr (:(= ), stop, Expr (:macrocall , Symbol (" @inbounds" ), LineNumberNode (@__LINE__ , Symbol ( @__FILE__ ) ), Expr (:(.), Expr (:ref , :lb , l), QuoteNode (:stop )))))
5
5
Loop (gensym (:n ), 0 , 1024 , start, stop, false , false ):: Loop
6
6
end
7
7
function Loop (ls:: LoopSet , l:: Int , :: Type{StaticUpperUnitRange{U}} ) where {U}
8
8
start = gensym (:loopstart )
9
- pushpreamble! (ls, Expr (:(= ), start, Expr (:macrocall , Symbol (" @inbounds" ), LineNumberNode (@__LINE__ , @__FILE__ ), Expr (:(.), Expr (:ref , :lb , l), QuoteNode (:L )))))
9
+ pushpreamble! (ls, Expr (:(= ), start, Expr (:macrocall , Symbol (" @inbounds" ), LineNumberNode (@__LINE__ , Symbol ( @__FILE__ ) ), Expr (:(.), Expr (:ref , :lb , l), QuoteNode (:L )))))
10
10
Loop (gensym (:n ), U - 1024 , U, start, Symbol (" " ), false , true ):: Loop
11
11
end
12
12
function Loop (ls:: LoopSet , l:: Int , :: Type{StaticLowerUnitRange{L}} ) where {L}
13
13
stop = gensym (:loopstop )
14
- pushpreamble! (ls, Expr (:(= ), stop, Expr (:macrocall , Symbol (" @inbounds" ), LineNumberNode (@__LINE__ , @__FILE__ ), Expr (:(.), Expr (:ref , :lb , l), QuoteNode (:U )))))
14
+ pushpreamble! (ls, Expr (:(= ), stop, Expr (:macrocall , Symbol (" @inbounds" ), LineNumberNode (@__LINE__ , Symbol ( @__FILE__ ) ), Expr (:(.), Expr (:ref , :lb , l), QuoteNode (:U )))))
15
15
Loop (gensym (:n ), L, L + 1024 , Symbol (" " ), stop, true , false ):: Loop
16
16
end
17
17
function Loop (ls, l, :: Type{StaticUnitRange{L,U}} ) where {L,U}
@@ -55,7 +55,7 @@ function ArrayReferenceMeta(
55
55
)
56
56
end
57
57
58
- extract_varg (i) = Expr (:macrocall , Symbol (" @inbounds" ), LineNumberNode (@__LINE__ , @__FILE__ ), Expr (:ref , :vargs , i))
58
+ extract_varg (i) = Expr (:macrocall , Symbol (" @inbounds" ), LineNumberNode (@__LINE__ , Symbol ( @__FILE__ ) ), Expr (:ref , :vargs , i))
59
59
pushvarg! (ls:: LoopSet , ar:: ArrayReferenceMeta , i) = pushpreamble! (ls, Expr (:(= ), vptr (ar), extract_varg (i)))
60
60
function pushvarg′! (ls:: LoopSet , ar:: ArrayReferenceMeta , i)
61
61
reverse! (ar. loopedindex); reverse! (getindices (ar)) # reverse the listed indices here, and transpose it to make it column major
@@ -81,7 +81,7 @@ function add_mref!(ls::LoopSet, ar::ArrayReferenceMeta, i::Int, ::Type{SparseStr
81
81
pushvarg! (ls, ar, i)
82
82
pushfirst! (getindices (ar), Symbol (" ##DISCONTIGUOUSSUBARRAY##" ))
83
83
end
84
- function add_mref! (ls:: LoopSet , ar:: ArrayReferenceMeta , i:: Int , :: Type{MappedStridedPointer{F,T,P}} ) where {F,T,P}
84
+ function add_mref! (ls:: LoopSet , ar:: ArrayReferenceMeta , i:: Int , :: Type{VectorizationBase. MappedStridedPointer{F,T,P}} ) where {F,T,P}
85
85
add_mref! (ls, ar, i, P)
86
86
end
87
87
function add_mref! (ls:: LoopSet , ar:: ArrayReferenceMeta , i:: Int , :: Type{LoopValue} )
@@ -113,7 +113,7 @@ function process_metadata!(ls::LoopSet, AM, num_arrays::Int)::Vector{Symbol}
113
113
sii = si:: Int
114
114
s = gensym (:symlicm )
115
115
push! (ls. preamble_symsym, (si, s))
116
- pushpreamble! (ls, Expr (:(= ), s, Expr (:macrocall , Symbol (" @inbounds" ), LineNumberNode (@__LINE__ ,@__FILE__ ), Expr (:ref , :vargs , num_arrays + i))))
116
+ pushpreamble! (ls, Expr (:(= ), s, Expr (:macrocall , Symbol (" @inbounds" ), LineNumberNode (@__LINE__ ,Symbol ( @__FILE__ ) ), Expr (:ref , :vargs , num_arrays + i))))
117
117
end
118
118
append! (ls. preamble_symint, AM[4 ]. parameters)
119
119
append! (ls. preamble_symfloat, AM[5 ]. parameters)
@@ -165,7 +165,7 @@ function add_parents_to_ops!(ls::LoopSet, ops::Vector{OperationStruct}, constoff
165
165
instr = instruction (op)
166
166
if instr != LOOPCONSTANT && instr. mod != = :numericconstant
167
167
constoffset += 1
168
- pushpreamble! (ls, Expr (:(= ), instr. instr, Expr (:macrocall , Symbol (" @inbounds" ), LineNumberNode (@__LINE__ , @__FILE__ ), Expr (:ref , :vargs , constoffset))))
168
+ pushpreamble! (ls, Expr (:(= ), instr. instr, Expr (:macrocall , Symbol (" @inbounds" ), LineNumberNode (@__LINE__ , Symbol ( @__FILE__ ) ), Expr (:ref , :vargs , constoffset))))
169
169
end
170
170
end
171
171
end
@@ -189,7 +189,7 @@ typeeltype(::Type{<:AbstractRange{T}}) where {T} = T
189
189
190
190
function add_array_symbols! (ls:: LoopSet , arraysymbolinds:: Vector{Symbol} , offset:: Int )
191
191
for (i,as) ∈ enumerate (arraysymbolinds)
192
- pushpreamble! (ls, Expr (:(= ), as, Expr (:macrocall , Symbol (" @inbounds" ), LineNumberNode (@__LINE__ , @__FILE__ ), Expr (:ref , :vargs , i + offset))))
192
+ pushpreamble! (ls, Expr (:(= ), as, Expr (:macrocall , Symbol (" @inbounds" ), LineNumberNode (@__LINE__ , Symbol ( @__FILE__ ) ), Expr (:ref , :vargs , i + offset))))
193
193
end
194
194
end
195
195
function extract_external_functions! (ls:: LoopSet , offset:: Int )
@@ -198,7 +198,7 @@ function extract_external_functions!(ls::LoopSet, offset::Int)
198
198
instr = instruction (op)
199
199
if instr. mod != :LoopVectorization
200
200
offset += 1
201
- pushpreamble! (ls, Expr (:(= ), instr. instr, Expr (:macrocall , Symbol (" @inbounds" ), LineNumberNode (@__LINE__ , @__FILE__ ), Expr (:ref , :vargs , offset))))
201
+ pushpreamble! (ls, Expr (:(= ), instr. instr, Expr (:macrocall , Symbol (" @inbounds" ), LineNumberNode (@__LINE__ , Symbol ( @__FILE__ ) ), Expr (:ref , :vargs , offset))))
202
202
end
203
203
end
204
204
end
0 commit comments