Skip to content

Conversation

@jakobbotsch
Copy link
Member

SSA does not model memory SSA faithfully inside try clauses. To model it
faithfully we would need to make all intermediate memory states in the
try block visible to the handler block. Doing so would require teaching
SSA about all nodes that define memory, and introduce a bunch of new
memory SSA states for EH constructs.

Instead of doing that this PR makes VN treat any handler block with
multiple incoming memory states (meaning that memory changed during the
try) conservatively. The diffs seem small enough; we can consider a more
elaborate fix in .NET 10.

Fix #86112

SSA does not model memory SSA faithfully inside try clauses. To model it
faithfully we would need to make all intermediate memory states in the
try block visible to the handler block. Doing so would require teaching
SSA about all nodes that define memory, and introduce a bunch of new
memory SSA states for EH constructs.

Instead of doing that this PR makes VN treat any handler block with
multiple incoming memory states (meaning that memory changed during the
try) conservatively. The diffs seem small enough; we can consider a more
elaborate fix in .NET 10.

Fix dotnet#86112
@ghost ghost added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Aug 12, 2024
@jakobbotsch jakobbotsch added this to the 9.0.0 milestone Aug 12, 2024
@jakobbotsch jakobbotsch marked this pull request as ready for review August 12, 2024 18:23
@jakobbotsch
Copy link
Member Author

cc @dotnet/jit-contrib PTAL @AndyAyersMS

Diffs

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.

Required memory PHIs are not added for un-analyzable memory stores by SSA

2 participants