We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 33273fe commit bcb653aCopy full SHA for bcb653a
src/driver.jl
@@ -282,6 +282,19 @@ const __llvm_initialized = Ref(false)
282
erase!(call)
283
end
284
285
+
286
+ # minimal optimization to convert the inttoptr/call into a direct call
287
+ @dispose pb=NewPMPassBuilder() begin
288
+ add!(pb, NewPMFunctionPassManager()) do fpm
289
+ add!(fpm, InstCombinePass())
290
+ end
291
+ run!(pb, ir, llvm_machine(job.config.target))
292
293
+ ## XXX: LLVM often leaves behind unused constant expressions containing function
294
+ ## pointer bitcasts we just optimized away, so prune those manually.
295
+ for f in functions(ir)
296
+ prune_constexpr_uses!(f)
297
298
299
300
# all deferred compilations should have been resolved
0 commit comments