-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Conversation
@AndyAyersMS Unless there's some exotic test failure this should be mostly done, except some code cleanup & comments. In any case, I don't see any reason not to use the |
src/jit/compiler.h
Outdated
BasicBlock* m_blk; | ||
GenTree* m_tree; | ||
BasicBlock* m_block; | ||
GenTreeOp* m_asg; |
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.
It does not belong to this PR but would it be possible to clean up the naming of members by replacing m_asg
, m_blk
and similar identifiers and start using self-documenting identifiers i.e. m_Assignment
. IMHO we are not that much restricted by identifier naming and IMO skipping all 3 letter verb or noun shortcuts in the code would help very much in improving code reading and understanding. Even m_block
would not complain very much if renamed to m_BasicBlock
or m_basicBlock
😃
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.
Changes look good overall.
Would recommend in places where you add new methods or alter signatures that you add the new-style header comments.
Thanks, this looks like a definite improvement. cc @dotnet/jit-contrib |
Sure, I was just looking around to see if there's anything left to cleanup before doing that. For example, I need to remove the |
If it's a SSA local it cannot also define memory
I similar change should be done in liveness, it also assumes that the definition occurs at the Also, I'm pretty sure that memory SSA is broken because it ignores definitions generated by |
And of course, this also makes the JIT a tiny bit faster in PIN - ~0.3%: https://1drv.ms/x/s!Av4baJYSo5pjgtMO1EpY1a1EvjYgYw?e=v1FlLg Oh well, I'll chalk up one more to #15108. |
@mikedn I presume you are ready to remove the "[WIP]" tag? |
Any diffs? |
Gonna kick off a bigger test run: /azp run coreclr-outerloop |
/azp run coreclr-outerloop |
Azure Pipelines successfully started running 1 pipeline(s). |
Hmmm... I guess you can't have any other text in that comment. Who knew? |
No FX diffs but looks like some Pri1 tests failed so perhaps there's something odd going on, I'll investigate. |
This matches the previous behavior that rejected LHS nodes that weren't the direct descendant of the ASG node - basically cases like ASG(IND(ADDR(LCL_VAR)), x). RangeCheck doesn't have the ability to follow such definitions. This also happens to reject LCL_FLD nodes as LHS. The machinery required to follow definition chains involving struct copies and field access is quite a bit more complicated and RangeCheck certainly doesn't have it.
Yeah, restoring the asserts that I accidentally deleted from You'd think that it shouldn't matter, that the rest of the
With V63 definition being a struct copy:
and V17 definition being an indirect field assignment, where the checked build crashed:
But it's not clear what happens if V17 definition was a direct field assignment. It looks like Meh, |
@dotnet/jit-contrib anyone else want to comment? If not, I'll merge this in a day or two. |
/azp run coreclr-outerloop |
Azure Pipelines successfully started running 1 pipeline(s). |
Thank you for your contribution. As announced in dotnet/coreclr#27549 this repository will be moving to dotnet/runtime on November 13. If you would like to continue working on this PR after this date, the easiest way to move the change to dotnet/runtime is:
|
@jashook any way to see the queue lengths for CI tests? Some of these tests are taking forever. |
@AndyAyersMS As far as I can tell, the jobs all passed, but there's some GitHub issue where it didn't get updated. Here's the AzDO link: https://dev.azure.com/dnceng/public/_build/results?buildId=415715&view=logs |
@BruceForstall thanks, am going to merge this. |
Currently the SSA definition is considered to be the
LCL_VAR
/LCL_FLD
node that's on the LHS of theASG
node -DefLoc::m_tree
points to it and not to theASG
node.This is inconvenient and inefficient when chasing SSA defs because one needs to use
gtGetParent
to find theASG
node from which the RHS can then be obtained.It also turns out to be at least misleading if not potentially incorrect - during rationalization stores are inserted at
ASG
's position, not at its LHS position. Normally the LHS immediately precedes theASG
node. In some cases there may be intervening nodes but they're not supposed to interfere with LHS. In theory. Good luck proving that :)So it makes more sense to consider the
ASG
node to be the SSA definition point.Of course,
ASG
should eventually be replaced bySTORE_LCL_VAR
/STORE_LCL_FLD
. This can be considered a very small step forward in that direction since it avoids the need forgtGetParent
.