forked from JuliaLang/julia
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
optimizer: enable SROA with constant globals (JuliaLang#42355)
```julia julia> const REF_FLD = :x; julia> code_typed() do r = Ref{Int}(42) # should be eliminated x = getfield(r, REF_FLD) # should be eliminated return sin(x) end |> only CodeInfo( 1 ─ %1 = Base.sitofp(Float64, 42)::Float64 │ %2 = invoke Base.Math.sin(%1::Float64)::Float64 └── return %2 ) => Float64 ```
- Loading branch information
1 parent
ee7fba6
commit 56ec8fd
Showing
2 changed files
with
66 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters