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

JIT: fix remaining phases that were rebuilding pred edges #80769

Merged
merged 2 commits into from
Jan 18, 2023

Conversation

AndyAyersMS
Copy link
Member

Loop canonicalization now maintains pred edges. GC poll insertion was already maintaining the edges but was rebuilding them anyways.

Now pred lists are never rebuilt.

Also revise fgUpdateChangedFlowGraph so that it no longer has the ability to remove or rebuild.

Fixes #49030.

Loop canonicalization now maintains pred edges. GC poll insertion was already
maintaining the edges but was rebuilding them anyways.

Now pred lists are never rebuilt.

Also revise `fgUpdateChangedFlowGraph` so that it no longer has the
ability to remove or rebuild.

Fixes dotnet#49030.
@dotnet-issue-labeler dotnet-issue-labeler bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Jan 18, 2023
@ghost ghost assigned AndyAyersMS Jan 18, 2023
@ghost
Copy link

ghost commented Jan 18, 2023

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch, @kunalspathak
See info in area-owners.md if you want to be subscribed.

Issue Details

Loop canonicalization now maintains pred edges. GC poll insertion was already maintaining the edges but was rebuilding them anyways.

Now pred lists are never rebuilt.

Also revise fgUpdateChangedFlowGraph so that it no longer has the ability to remove or rebuild.

Fixes #49030.

Author: AndyAyersMS
Assignees: -
Labels:

area-CodeGen-coreclr

Milestone: -

@AndyAyersMS
Copy link
Member Author

@BruceForstall PTAL
cc @dotnet/jit-contrib

A handful of diffs expected, where we now have original edge weights instead of freshly constructed "know nothing" weights.

@BruceForstall
Copy link
Member

/azp run runtime-coreclr jitstress, runtime-coreclr libraries-jitstress

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@AndyAyersMS
Copy link
Member Author

/azp run runtime-coreclr jitstress, runtime-coreclr libraries-jitstress

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@AndyAyersMS
Copy link
Member Author

Seeing

Assert failure(PID 9175 [0x000023d7], Thread: 9191 [0x23e7]): Assertion failed '!varTypeUsesFloatReg(targetType) || (emitTypeSize(targetType) == emitTypeSize(op1Type))' in 'System.Numerics.Tests.Matrix3x2Tests:Matrix3x2EqualsNaNTest():this' during 'Generate code' (IL size 763; hash 0xd96aa0b9; FullOpts)

which is known stress issue #80773

@AndyAyersMS
Copy link
Member Author

SPMI diffs timed out for x86, am going to ignore this.

@AndyAyersMS
Copy link
Member Author

Diffs

Small TP win. Either rebuilding pred lists is pretty cheap or (more likely) most methods don't need gc polls or loop canonicalization. But that's not the point of this change - when we rebuild pred lists we throw away information, and (in upcoming work) we want to keep even more useful information there.

@AndyAyersMS
Copy link
Member Author

Jitstress had some timeouts.

Libraries jitstress had some widespread issue that seems unrelated. I am going to merge since I think I fixed the relevant issue and hopefully tonight's runs on main will be good.

@AndyAyersMS AndyAyersMS merged commit 7f3f5ef into dotnet:main Jan 18, 2023
@AndyAyersMS AndyAyersMS mentioned this pull request Jan 20, 2023
44 tasks
mdh1418 pushed a commit to mdh1418/runtime that referenced this pull request Jan 24, 2023
Loop canonicalization now maintains pred edges. GC poll insertion was already
maintaining the edges but was rebuilding them anyways.

Now pred lists are never rebuilt.

Also revise `fgUpdateChangedFlowGraph` so that it no longer has the
ability to remove or rebuild.

Fixes dotnet#49030.
Also fixes dotnet#80772.
@ghost ghost locked as resolved and limited conversation to collaborators Feb 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Loop opts should not be recomputing pred lists from scratch
2 participants