Conversation
The experiment above show that this statement isn't always true.
Looking into the initial pull request (i.e. f9367b3), there are some assert hit. I have a hard time to reproduce them. I was able to reproduce one on them in the So I decide I would experiment with the big hammer, just change verifyRegUsed() to actually change the mask. In that case, all CI tasks passed. Apparently, this isn't the right thing to do, that was meant to be an experiment. The key problem I have right now is that I am not sure what is wrong - why ain't the register already marked? I guess 7ea82a0 is the right fix, but there must be something else like that I can't find. What would be a good approach to find those missed marking? |
Thanks for the work thus far!
Actually, this is probably the right thing to do as a first change. It duplicates existing behavior, while removing the unnecessary So - it appears that my assertion that any register that's referenced should already be in the modified set wasn't correct. I would suggest that you simply make the change to call I'll have a look at the changes. |
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.
I like these changes overall - just need a couple of function headers.
I think it would be good to get this merged (it will be great to eliminate this unnecessary class), and then work on determining where the registers aren't already been set as modified.
src/jit/regset.cpp
Outdated
@@ -45,6 +45,20 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX | |||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX | |||
*/ | |||
|
|||
void RegSet::verifyRegUsed(regNumber reg) |
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.
These two methods need function headers. See https://github.com/dotnet/coreclr/blob/master/Documentation/coding-guidelines/clr-jit-coding-conventions.md#9.4.1.
Under the "Notes" section I would add a note saying that this method is intended to be called during code generation, and should simply validate that the register (or registers) have already been added to the modified set. Then, add a TODO-Cleanup:
comment saying that we need to identify the places where this has not been done.
The FP case is one that could/should be done at the time that the frame type is determined (
Here's what I would suggest:
|
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.
Awesome - thanks!
https://github.com/dotnet/coreclr/issues/18179
@BruceForstall
@CarolEidt