-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Arm64: Add back the annotation in JitDisasm with the local var (+offset) #85671
Conversation
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch Issue DetailsFixes: #84504
|
unsigned idVarRefOffs; // IL offset for LclVar reference | ||
unsigned idVarRefOffs2; // IL offset for 2nd LclVar reference (in case this is a pair) |
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.
Are these IL offsets actually maintained/set/used enough to care about them? Last time I checked the logic, that was not the case.
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.
Currently they are not. The only place they are used currently is in emitDispFrameRef()
under a flag compiler->opts.varNames
which is always false
. Added this to retain the consistency, when (if) we re-enable varNames
functionality.
@dotnet/jit-contrib |
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.
Nice. I suppose there can be ambiguity because for pair instructions only one of the pair might be a valid lclvar and when we print it you won't know if it applies to the first or second register?
src/coreclr/jit/compiler.hpp
Outdated
@@ -1466,6 +1466,7 @@ inline GenTreeLclVar* GenTree::BashToLclVar(Compiler* comp, unsigned lclNum) | |||
ChangeOper(GT_LCL_VAR); | |||
ChangeType(varDsc->lvNormalizeOnLoad() ? varDsc->TypeGet() : genActualType(varDsc)); | |||
AsLclVar()->SetLclNum(lclNum); | |||
INDEBUG(AsLclVar()->ResetLclILoffs()); |
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.
ResetLclILoffs
should be done as part of SetOper
instead of being scattered around the callers.
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 thought to do in ChangeOper()
but that would mean I would have to check for oper == GT_LCL_VAR
, but I suppose since this is DEBUG
, it shouldn't matter much and may be SetOper()
is more natural place. I will move it.
Not really. If you see the existing code, we would create lclVarPair only if both runtime/src/coreclr/jit/emitarm64.cpp Lines 6577 to 6584 in 56eff9f
For all the other cases, we will just set |
Fixes: #84504