Use unoptimized lookup if source is not available#647
Use unoptimized lookup if source is not available#647aviatesk merged 5 commits intoJuliaDebug:masterfrom
Conversation
887764b to
b00f001
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #647 +/- ##
======================================
Coverage 0.00% 0.00%
======================================
Files 9 11 +2
Lines 1556 1572 +16
======================================
- Misses 1556 1572 +16 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
I think we can also just remove preprocess_ci by now, and make Cthulhu a bit more faithful. |
|
Done in 12e17cc. What was the motivation to introduce it in the first place? It would seem natural that we'd always want something as faithful as possible for a debugging/introspection tool. |
|
Ready for final review & merge. |
topolarity
left a comment
There was a problem hiding this comment.
Nice! It's a bit confusing to see un-optimized IR all of a sudden, but that's pretty easy to notice and the [constprop] Disabled by rettype heuristic (limited accuracy) remarks are very useful.
Looks good to me, thanks @serenity4 !
|
(I'm not familiar with Cthulhu internals, so this would still benefit from a review from someone who is) |
|
@aviatesk a review would be highly appreciated :) |
aviatesk
left a comment
There was a problem hiding this comment.
Thanks for fixing the issue!
|
TypedSyntax seems to be broken on both nightly and v1.12... We should merge this regardless though. |
Fixes #642.
If we hit a
CodeInstancethat doesn't have inferred code, we now look up its unoptimized (but inferred) source. I think that's the behavior we want, because then we can look into why it wasn't kept (in the case of #642, we can see that lots of constprops were disabled due toLimitedAccuracy, for example). @topolarity feel free to@descendinto #642 (comment) and confirm that inspection provides what you would expect to see.The DCE path for
preprocess_ci!(ci::CodeInfo, ...)was apparently unused, I made a few fixes but I believeCallInfos are almost guaranteed to get out of sync which would trigger an assertion error afterwards. Perhaps we should return the IR instead so we can then extractir.stmts.info? Anyways, I ended up not requiring it and disabling optimization if we have to fall back to an unoptimized lookup, so that seems to remain unused at the moment.I believe that testing that would require re-enabling the terminal tests, as we'd have to descend into a specific call. I suggest to put that off for now.