@@ -90,10 +90,7 @@ function transform_gpu!(def, constargs, force_inbounds, unsafe_indices)
9090 pushfirst! (def[:args ], :__ctx__ )
9191 new_stmts = Expr[]
9292 body = MacroTools. flatten (def[:body ])
93- # On 1.11 and later having this aliasscope causes issues
94- # even with kernels that don't use `@Const` on arguments
95- # See https://github.com/JuliaGPU/KernelAbstractions.jl/issues/652
96- # push!(new_stmts, Expr(:aliasscope))
93+ push! (new_stmts, Expr (:aliasscope ))
9794 if ! unsafe_indices
9895 push! (new_stmts, :(__active_lane__ = $ __validindex (__ctx__)))
9996 end
@@ -108,7 +105,7 @@ function transform_gpu!(def, constargs, force_inbounds, unsafe_indices)
108105 if force_inbounds
109106 push! (new_stmts, Expr (:inbounds , :pop ))
110107 end
111- # push!(new_stmts, Expr(:popaliasscope))
108+ push! (new_stmts, Expr (:popaliasscope ))
112109 push! (new_stmts, :(return nothing ))
113110 def[:body ] = Expr (
114111 :let ,
@@ -135,18 +132,15 @@ function transform_cpu!(def, constargs, force_inbounds)
135132 pushfirst! (def[:args ], :__ctx__ )
136133 new_stmts = Expr[]
137134 body = MacroTools. flatten (def[:body ])
138- # On 1.11 and later having this aliasscope causes issues
139- # even with kernels that don't use `@Const` on arguments
140- # See https://github.com/JuliaGPU/KernelAbstractions.jl/issues/652
141- # push!(new_stmts, Expr(:aliasscope))
135+ push! (new_stmts, Expr (:aliasscope ))
142136 if force_inbounds
143137 push! (new_stmts, Expr (:inbounds , true ))
144138 end
145139 append! (new_stmts, split (emit_cpu, body. args))
146140 if force_inbounds
147141 push! (new_stmts, Expr (:inbounds , :pop ))
148142 end
149- # push!(new_stmts, Expr(:popaliasscope))
143+ push! (new_stmts, Expr (:popaliasscope ))
150144 push! (new_stmts, :(return nothing ))
151145 def[:body ] = Expr (
152146 :let ,
0 commit comments