MilesCranmer / DispatchDoctor.jl

The dispatch doctor prescribes type stability
Apache License 2.0
128 stars 6 forks source link

More correct at the LLVM level? #30

Open ChrisRackauckas opened 4 weeks ago

ChrisRackauckas commented 4 weeks ago

Does this implementation give false positives? I would think you would need to run this after optimizations, such as DCE, in order for this to not have false positives?

MilesCranmer commented 4 weeks ago

It relies on Base.promote_op to do the inference. So whatever optimizations are used for Base.promote_op will apply here.

I haven't found a false positive but I am sure they exist. For example I ran into https://github.com/MilesCranmer/DispatchDoctor.jl/issues/27 but it turned out to be a real typeof instability due to how Core.kwcall works.