Skip to content

Conversation

@MichalStrehovsky
Copy link
Member

Fixes #97286.

This just aborts preinitialization if we see dataflow might be involved. It's a conservative fix. We don't have a good spot to communicate dataflow need (e.g. everything from the cctor could potentially be optimized away if the codegen inlines that knowledge).

Cc @dotnet/ilc-contrib

Fixes dotnet#97286.

This just aborts preinitialization if we see dataflow might be involved. It's a conservative fix. We don't have a good spot to communicate dataflow need (e.g. _everything_ from the cctor could potentially be optimized away if the codegen inlines that knowledge).
@ghost
Copy link

ghost commented Feb 12, 2024

Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas
See info in area-owners.md if you want to be subscribed.

Issue Details

Fixes #97286.

This just aborts preinitialization if we see dataflow might be involved. It's a conservative fix. We don't have a good spot to communicate dataflow need (e.g. everything from the cctor could potentially be optimized away if the codegen inlines that knowledge).

Cc @dotnet/ilc-contrib

Author: MichalStrehovsky
Assignees: -
Labels:

area-NativeAOT-coreclr

Milestone: -


class TestIndirectLoads
{
static unsafe U Read<T, U>(T val) where T : unmanaged where U : unmanaged
Copy link
Member Author

Choose a reason for hiding this comment

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

Roslyn generates this as new() constraint which is very unfortunate because it requires dataflow.

Copy link
Member

@jkotas jkotas left a comment

Choose a reason for hiding this comment

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

Thanks

@MichalStrehovsky MichalStrehovsky merged commit 4d69ab7 into dotnet:main Feb 13, 2024
@MichalStrehovsky MichalStrehovsky deleted the fix97286 branch February 13, 2024 06:54
@github-actions github-actions bot locked and limited conversation to collaborators Mar 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Type preinitialization skips dataflow analysis

2 participants