Open KristofferC opened 2 months ago
In the long run this could be hard to do. I think it's likely that trimming may ultimately include changes to the specialization heuristics and that might be difficult to mimic in a standard interactive session. Nevertheless the general idea is excellent, and getting at least close seems well worth the attempt.
The main practical obstacle is that currently the notion of "If a call is too dynamic to reasonably narrow down the possible call targets" requires reading the source of https://github.com/JuliaLang/julia/pull/55047 to make sufficiently concrete (straightforward, but might be best to wait until it merges).
JET.@report_opt
shows more things than are needed for trimming to work. A useful mode could be to restrict the printed things to only those that would prevent trimming.