File tree Expand file tree Collapse file tree 1 file changed +15
-15
lines changed Expand file tree Collapse file tree 1 file changed +15
-15
lines changed Original file line number Diff line number Diff line change @@ -142,21 +142,6 @@ import GPUCompiler: IRError, InvalidIRError
142142
143143function restore_lookups (mod:: LLVM.Module ):: Nothing
144144 T_size_t = convert (LLVM. LLVMType, Int)
145- for (v, k) in FFI. ptr_map
146- if haskey (functions (mod), k)
147- f = functions (mod)[k]
148- replace_uses! (
149- f,
150- LLVM. Value (
151- LLVM. API. LLVMConstIntToPtr (
152- ConstantInt (T_size_t, convert (UInt, v)),
153- value_type (f),
154- ),
155- ),
156- )
157- eraseInst (mod, f)
158- end
159- end
160145 for f in functions (mod)
161146 for fattr in collect (function_attributes (f))
162147 if isa (fattr, LLVM. StringAttribute)
@@ -175,6 +160,21 @@ function restore_lookups(mod::LLVM.Module)::Nothing
175160 end
176161 end
177162 end
163+ for (v, k) in FFI. ptr_map
164+ if haskey (functions (mod), k)
165+ f = functions (mod)[k]
166+ replace_uses! (
167+ f,
168+ LLVM. Value (
169+ LLVM. API. LLVMConstIntToPtr (
170+ ConstantInt (T_size_t, convert (UInt, v)),
171+ value_type (f),
172+ ),
173+ ),
174+ )
175+ eraseInst (mod, f)
176+ end
177+ end
178178end
179179
180180function check_ir (interp, @nospecialize (job:: CompilerJob ), mod:: LLVM.Module )
You can’t perform that action at this time.
0 commit comments