-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Use a simpler representation for array addresses after morph #64581
Conversation
Tagging subscribers to this area: @JulieLeeMSFT Issue DetailsThis deletes: the This adds: a new node, Contributes to #11057. There will be a second change that deletes We're expected a small set of diffs. Almost all will be caused by different costing by
|
1016f12
to
2ea98b2
Compare
CI failures are #60154 and emscripten-core/emscripten#16164. @dotnet/jit-contrib |
@SingleAccretion It's clear you have an idea of a large set of related changes that you plan to make over time as part of a long-term plan. E.g., your reference above to removing GT_INDEX. I think it would be worthwhile to identify all these in an issue, maybe just the "remove GT_ADDR" node issue #11057, updated and "renewed" with a checkbox list of work. Or maybe a new issue. That would provide a place to get design feedback before you actually do the work. |
@BruceForstall Thank you for the request, I've summarized my current thinking in #11057 (comment). I believe most changes in this area will be fairly straightforward (as in, don't have a design consideration attached to them), this array change is perhaps the exception.
First of all, From the maintainability point of view, I believe that the explicit nature of the annotation node helps prevent mistakes in its handling - it is notable how The downside is that |
3d938c0
to
768c74d
Compare
b189c7c
to
bb3b95f
Compare
Ping @BruceForstall for review. |
bbb059c
to
9e34423
Compare
I plan to look at this again soon. |
9e34423
to
c606577
Compare
We only need to update the side effects, and gtUpdateNodeSideEffects already takes care of that. Will avoid copying GTF_NO_CSE unnecessarily. No diffs.
This preserves the non-faultness annotation for the parent indir when ADDR(IND(ARR_ADDR)) -> ARR_ADDR folding happends.
We don't need the field sequence or the complex parsing. A few diffs because previos code didn't handle COMMAs. (The new code doesn't either, but they are skipped automatically by the optComputeLoopSideEffectsOfBlock).
Move it to GenTreeArrAddr, stop using ArrayInfo.
FldSeq no loger expected or needed. We will be attaching it to ARR_ADDR directly in the future.
And associated code. No longer needed, and we will use a different mechanism for ARR_ADDR. No diffs.
No longer needed...
c606577
to
7d914b9
Compare
Would it be possible to make this a zero diff change, possibly with some "scaffolding", and then make a small(er) follow-up change that removes that scaffolding and has diffs? |
I tried my best to achieve that (the way I make most changes, including this one, is by writing the code and then eliminating all diffs from the result), but ultimately quirking The COMMA handling could be quirked, but not sure how much value that has given we'll still have diffs from costs. I can look into it again if you think that's valuable enough. |
No, the diffs look small enough so it's not worth it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
This is an impressive simplification. I love getting rid of "side table" data structures that are outside the IR.
Thanks for the contribution!
fyi, it looks like this change leads to (temporary) cases of:
in SPMI replay. This is because This will get cleared up when another SPMI collection is done. |
This deletes: the
ArrayInfo
map, maintenance of non-standard constant index field sequences, maintenance of index labeling flags,GT_ADDR
in array addresses post-morph, specialIND
s that cannot be folded away, and finally, pseudo-fields.This adds: a new node,
GT_ARR_ADDR
, to replace all the functionality provided by the above features.Contributes to #11057. There will be a second change that deletes
GT_INDEX
, instead importingGT_INDEX_ADDR
directly (with anIND/OBJ
on top if necessary).We're expecting a small set of diffs. Almost all will be caused by different costing by
gtSetEvalOrder
, causing arg sorting / CSE / tail duplication to make different decisions. The rest are due to better COMMA handling inoptComputeLoopSideEffectsOfBlock
.