Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from JuliaLang:master #1790

Merged
merged 5 commits into from
Mar 11, 2023
Merged

Conversation

pull[bot]
Copy link

@pull pull bot commented Mar 11, 2023

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

DilumAluthgeBot and others added 5 commits March 10, 2023 18:22
IncrementalCompact ordinarily takes ownership of the CFG in order to to its
transform. cfg_simplify! separate constructs the CFG transform structures
ahead of time and was assuming this meant that the original CFG remained
untouched (since it was using it for lookup operations). Unfortunately,
the IncrementalCompact constructor was already doing some CFG manipulation
cuasing the CFG to be corrupted and cfg_simplify! to create invalid IR.
Fix that by refactoring the IncrementalCompact constructor to allow
passing in the CFG transformation state explicitly, rather than poking
it into the fields afterwards.
Since it does not compute and branch on typeof, in my measurements, this
implementation is up to 10x faster!
Currently, semi-concrete eval results are one-to-one associated with
a particular callsite, so in theory we can destroy them during
inlining and nothing bad will happen. However, since we propagate
them using the `:info` field, this breaks the assumption that we
can copy IRCode around and re-run the compiler on it without ill
effect. In general, the `:info` field is assumed generally
immutable and mutating the IR containted therein breaks all sorts
of assumptions. Perhaps in the future, we can avoid destroying
the IRCode that we're about to inline, which would make all this
copying unnecessary (note that we're already copying for every case
other than semi-concrete eval), but for now just fix the robustness
issue here.
@pull pull bot added the ⤵️ pull label Mar 11, 2023
@pull pull bot merged commit 441c570 into MLH-Fellowship:master Mar 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants