Skip to content

Conversation

jakobbotsch
Copy link
Member

Potential alternative to #110516

@ghost ghost added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Dec 12, 2024
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

Looks like there are some x86 pre-order calls to gtFoldExpr that are problematic with this attempt.

@AndyAyersMS
Copy link
Member

I am tempted to try something like the following. We remove all setting / checking for the morphed flag outside of morph.

Then we introduce an ambient state "allow remorph" which morph sets around remorphing the results of postorder calls to utilities like gtFoldExpr that make changes (we may also need more reliable means to tell if these utilities indeed made any changes). When this state is set morph doesn't assert if nodes it processes are already morphed. We can decide if we want to operationalize this and actually allow morph to skip remorphing of already morphed trees or just live with some redundant morphing.

Post global morph, we then verify everything got morphed at least once (eg has the flag set).

Or we change the flag into a count and assert post global morph that the count values are always at least 1 and not too large (so we're not doing crazy amounts of possibly redundant morphing).

@AndyAyersMS
Copy link
Member

Likely obsolete, given #110787

@jakobbotsch jakobbotsch deleted the remorph-alternate-fix branch December 18, 2024 22:14
@github-actions github-actions bot locked and limited conversation to collaborators Jan 18, 2025
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.

2 participants