-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
optimizer: SROA
mutable(immutable(...))
case correctly
Our SROA should be able to handle `mutable(immutable(...))` case even without "proper" alias analysis, since we eliminate `immutable` first and then process `mutable` within our iterative approach. It turns out it hasn't worked at all because after the immutable handling we keep the reference count _before_ DCE, but didn't update dead reference count. This commit fixes it and now we should be able to eliminate more allocations, e.g.: ```julia julia> simple_sroa(s) = broadcast(identity, Ref(s)) simple_sroa (generic function with 1 method) julia> simple_sroa("compile"); @allocated(simple_sroa("julia")) 0 ```
- Loading branch information
Showing
3 changed files
with
43 additions
and
13 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
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