-
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
Mark SIMD assignments as related to SIMD intrinsics #51731
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
0e12823
Ensure that GenTreeJitIntrinsic explicitly zeroes out certain nodes
tannergooding 0a50867
Mark SIMD assignments as related to SIMD intrinsics
tannergooding 9debe4a
Refactor SetOpLclRelatedToSIMDIntrinsic so it is easier to debug/unde…
tannergooding 954782a
Applying formatting patch
tannergooding a4c5ca3
Mark SIMD assignments as related to SIMD intrinsics on x86
tannergooding File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4847,7 +4847,7 @@ struct GenTreeIntrinsic : public GenTreeOp | |
struct GenTreeJitIntrinsic : public GenTreeOp | ||
{ | ||
private: | ||
ClassLayout* m_layout; | ||
ClassLayout* gtLayout; | ||
|
||
unsigned char gtAuxiliaryJitType; // For intrinsics than need another type (e.g. Avx2.Gather* or SIMD (by element)) | ||
regNumberSmall gtOtherReg; // For intrinsics that return 2 registers | ||
|
@@ -4867,13 +4867,13 @@ struct GenTreeJitIntrinsic : public GenTreeOp | |
|
||
ClassLayout* GetLayout() const | ||
{ | ||
return m_layout; | ||
return gtLayout; | ||
} | ||
|
||
void SetLayout(ClassLayout* layout) | ||
{ | ||
assert(layout != nullptr); | ||
m_layout = layout; | ||
gtLayout = layout; | ||
} | ||
|
||
regNumber GetOtherReg() const | ||
|
@@ -4927,6 +4927,9 @@ struct GenTreeJitIntrinsic : public GenTreeOp | |
GenTreeJitIntrinsic( | ||
genTreeOps oper, var_types type, GenTree* op1, GenTree* op2, CorInfoType simdBaseJitType, unsigned simdSize) | ||
: GenTreeOp(oper, type, op1, op2) | ||
, gtLayout(nullptr) | ||
, gtAuxiliaryJitType(CORINFO_TYPE_UNDEF) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is needed due to an assert encountered while running PMI diffs, its related to the refactoring that happened in #50832. |
||
, gtOtherReg(REG_NA) | ||
, gtSimdBaseJitType((unsigned char)simdBaseJitType) | ||
, gtSimdSize((unsigned char)simdSize) | ||
, gtHWIntrinsicId(NI_Illegal) | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 isn't clear why we were only checking for
OBJ(ADDR(LCL))
here. We also sometimes generateBLK(ADDR(LCL))
or other nodes and so something like the following seems like it might be a better choice, given that it will cover all indirections over locals: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.
We don't seem to be very consistent on what we check for calling
setLclRelatedToSIMDIntrinsic
either. The paths that createSIMD
orHWINTRINSIC
nodes all callSetOpLclRelatedToSIMDIntrinsic
, while several other paths callsetLclRelatedToSIMDIntrinsic
directly.Of those that call
setLclRelatedToSIMDIntrinsic
directly, they vary on what they check before callingsetLclRelatedToSIMDIntrinsic
. Sometimes simply checkingOperIsLocal
, sometimes checking for specific kinds of indirections, and sometimes checking all indirections. It would be nice (assuming nothing is blocking it), if all of those checks could centrally be handled here so they are consistent.