Skip to content
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

Don't allow preinitialization to skip dataflow #98318

Merged
merged 1 commit into from
Feb 13, 2024

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: -

@@ -1310,15 +1311,17 @@ public static void Run()

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
117 of 120 checks passed
@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