Conversation
Due to lazy field type initialization, the `types` field is actually mutable in `DataType`. This means that we cannot use immutable or constant TBAA for all `DataType` fields. However, since any objects stored in the field are still rooted over the lifetime of the `DataType` we can still let the GC root placement pass refine any field to the parent `DataType`. Also make use of the field offset to still mark known load from all other fields as constant. This is currently done via a special case but it could also be useful for many other types too.
oscardssmith
pushed a commit
to oscardssmith/julia
that referenced
this pull request
Aug 28, 2020
Due to lazy field type initialization, the `types` field is actually mutable in `DataType`. This means that we cannot use immutable or constant TBAA for all `DataType` fields. However, since any objects stored in the field are still rooted over the lifetime of the `DataType` we can still let the GC root placement pass refine any field to the parent `DataType`. Also make use of the field offset to still mark known load from all other fields as constant. This is currently done via a special case but it could also be useful for many other types too.
simeonschaub
pushed a commit
to simeonschaub/julia
that referenced
this pull request
Aug 29, 2020
Due to lazy field type initialization, the `types` field is actually mutable in `DataType`. This means that we cannot use immutable or constant TBAA for all `DataType` fields. However, since any objects stored in the field are still rooted over the lifetime of the `DataType` we can still let the GC root placement pass refine any field to the parent `DataType`. Also make use of the field offset to still mark known load from all other fields as constant. This is currently done via a special case but it could also be useful for many other types too.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Due to lazy field type initialization, the
typesfield is actually mutable inDataType.This means that we cannot use immutable or constant TBAA for all
DataTypefields.However, since any objects stored in the field are still rooted
over the lifetime of the
DataTypewe can still let the GC root placement pass refineany field to the parent
DataType.Also make use of the field offset to still mark known load from all other fields as constant.
This is currently done via a special case but it could also be useful for many other types too.
Ref #37044