RFC: Also change lowering of getproperty #37289
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
So after thinking about #37268, I was wondering what would happen
if one applied the same trick to the lowering of
getproperty
as well. This PR starts at that, but is mostly a placeholder for
discussion of whether this is something we want to do. In particular,
this PR lowers
a.b
to:with a default implementation of
The inference benefit is as expected. Timing end-to-end inference&optimize
time of:
shows that time to infer
f
drops by about a third (because it doesn't need toinfer getproperty twice). Overall build time of the system image drops
by 6% for me.
If we do decide to go this way, things that would still need to be fixed:
setproperty!
ccall
doesn't like this lowering. Didn't look into it too closelyalong the lines of
but obviously it would need inference integration to be fast.