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

effects: refactor builtin_effects #46097

Merged
merged 1 commit into from
Jul 25, 2022
Merged

effects: refactor builtin_effects #46097

merged 1 commit into from
Jul 25, 2022

Conversation

aviatesk
Copy link
Sponsor Member

Factor special builtin handlings into separated functions
(e.g. getfield_effects) so that we can refactor them more easily.

This also improves analysis accuracy a bit, e.g.

julia> Base.infer_effects((Bool,)) do c
           obj = c ? Some{String}("foo") : Some{Symbol}(:bar)
           return getfield(obj, :value)
       end
(!c,+e,!n,+t,!s) # master
(+c,+e,!n,+t,+s) # this PR

@aviatesk
Copy link
Sponsor Member Author

@nanosoldier runbenchmarks("inference", vs=":master")

@nanosoldier
Copy link
Collaborator

Your benchmark job has completed - possible performance regressions were detected. A full report can be found here.

@aviatesk
Copy link
Sponsor Member Author

I'd like to merge this after #46111 to avoid manual works when backporting it.

@aviatesk aviatesk force-pushed the avi/getfieldeffects branch 3 times, most recently from 35734c0 to 5795eb0 Compare July 25, 2022 13:13
Factor special builtin handlings into separated functions
(e.g. `getfield_effects`) so that we can refactor them more easily.

This also improves analysis accuracy a bit, e.g.
```julia
julia> Base.infer_effects((Bool,)) do c
           obj = c ? Some{String}("foo") : Some{Symbol}(:bar)
           return getfield(obj, :value)
       end
(!c,+e,!n,+t,!s) # master
(+c,+e,!n,+t,+s) # this PR
```
@aviatesk aviatesk merged commit 2982986 into master Jul 25, 2022
@aviatesk aviatesk deleted the avi/getfieldeffects branch July 25, 2022 19:39
ffucci pushed a commit to ffucci/julia that referenced this pull request Aug 11, 2022
Factor special builtin handlings into separated functions
(e.g. `getfield_effects`) so that we can refactor them more easily.

This also improves analysis accuracy a bit, e.g.
```julia
julia> Base.infer_effects((Bool,)) do c
           obj = c ? Some{String}("foo") : Some{Symbol}(:bar)
           return getfield(obj, :value)
       end
(!c,+e,!n,+t,!s) # master
(+c,+e,!n,+t,+s) # this PR
```
pcjentsch pushed a commit to pcjentsch/julia that referenced this pull request Aug 18, 2022
Factor special builtin handlings into separated functions
(e.g. `getfield_effects`) so that we can refactor them more easily.

This also improves analysis accuracy a bit, e.g.
```julia
julia> Base.infer_effects((Bool,)) do c
           obj = c ? Some{String}("foo") : Some{Symbol}(:bar)
           return getfield(obj, :value)
       end
(!c,+e,!n,+t,!s) # master
(+c,+e,!n,+t,+s) # this PR
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants