Skip to content

Simplify accessed storage; remove RefElementAddr #24728

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

Merged
merged 2 commits into from
May 14, 2019
Merged

Simplify accessed storage; remove RefElementAddr #24728

merged 2 commits into from
May 14, 2019

Conversation

atrick
Copy link
Contributor

@atrick atrick commented May 13, 2019

Remove RefElementAddr field from AccessedStorage.

- code simplification critical for comprehension
- substantially improves the overhead of AccessedStorage comparison
- as a side effect improves precision of analysis in some cases

AccessedStorage is meant to be an immutable value type that identifies
a storage location with minimal representation. It is used in many global
interprocedural data structures.

The RefElementAddress instruction that it was derived from does not
contribute to the uniqueness of the storage location. It doesn't
belong here. It was being used to create a ProjectionPath, which is an
extremely inneficient way to compare access paths.

Just delete all the code related to that extra field.

@atrick atrick requested a review from shajrawi May 13, 2019 05:48
@atrick
Copy link
Contributor Author

atrick commented May 13, 2019

@swift-ci test.

@atrick
Copy link
Contributor Author

atrick commented May 13, 2019

@swift-ci test source compatibility.

@atrick atrick changed the title Simplify accessed storage no rea Simplify accessed storage; remove RefElementAddr May 13, 2019
@atrick
Copy link
Contributor Author

atrick commented May 13, 2019

Just ignore the first commit "Cache struct/class field offsets in SIL". I'll wait for that PR to be reviewed before merging this one--rebasing is getting to frustrating.

@atrick
Copy link
Contributor Author

atrick commented May 13, 2019

@swift-ci test.

@atrick
Copy link
Contributor Author

atrick commented May 13, 2019

@swift-ci test source compatibility

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 8993d0c5cfdd5332b2244f39bc43a5fcde373262

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 8993d0c5cfdd5332b2244f39bc43a5fcde373262

@atrick
Copy link
Contributor Author

atrick commented May 13, 2019

@swift-ci test

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 2fbe85653c7d0e9dd1653f73579346fd6451a006

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 2fbe85653c7d0e9dd1653f73579346fd6451a006

Copy link

@shajrawi shajrawi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

atrick added 2 commits May 14, 2019 10:45
- code simplification critical for comprehension
- substantially improves the overhead of AccessedStorage comparison
- as a side effect improves precision of analysis in some cases

AccessedStorage is meant to be an immutable value type that identifies
a storage location with minimal representation. It is used in many global
interprocedural data structures.

The RefElementAddress instruction that it was derived from does not
contribute to the uniqueness of the storage location. It doesn't
belong here. It was being used to create a ProjectionPath, which is an
extremely inneficient way to compare access paths.

Just delete all the code related to that extra field.
@atrick
Copy link
Contributor Author

atrick commented May 14, 2019

@swift-ci smoke test and merge.

@atrick
Copy link
Contributor Author

atrick commented May 14, 2019

@swift-ci smoke test and merge

@swift-ci swift-ci merged commit 05808b9 into swiftlang:master May 14, 2019
@atrick atrick deleted the simplify-accessed-storage-no-rea branch May 14, 2019 19:34
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.

3 participants