Skip to content

JIT: Overwrite cache during recursive map select in VN #115219

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

Merged
merged 2 commits into from
May 14, 2025

Conversation

jakobbotsch
Copy link
Member

If the recursive select runs out of budget it may have already cached a value. In that case allow overwriting the cached value (which should just replace it with the same value).

This handles a similar case that the other case already handles:

// We may have run out of budget and already assigned a result
if (!GetMapSelectWorkCache()->Lookup(fstruct, &entry))

Fix #108850

If the recursive select runs out of budget it may have already cached a
value. In that case allow overwriting the cached value (which should
just replace it with the same value).
@Copilot Copilot AI review requested due to automatic review settings May 1, 2025 10:43
@ghost ghost added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label May 1, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the recursive map select routine in the JIT to allow overwriting a previously cached value when running out of budget. The change mirrors similar behavior in a related case in the runtime code.

  • Changed the caching call to use the Overwrite flag in GetMapSelectWorkCache()->Set.
  • Added inline comments explaining the rationale for allowing overwrites.

Copy link
Contributor

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

@jakobbotsch
Copy link
Member Author

jakobbotsch commented May 1, 2025

PTAL @dotnet/jit-contrib

No diffs

@jakobbotsch jakobbotsch requested a review from a team May 1, 2025 14:21
@jakobbotsch jakobbotsch merged commit f76d757 into dotnet:main May 14, 2025
109 of 110 checks passed
@jakobbotsch jakobbotsch deleted the fix-108850 branch May 14, 2025 07:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.

Assertion failed 'kind == Overwrite' during 'VN-based dead store removal'
2 participants