-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Refactor HasMultiRegRetVal and impFixupCallStructReturn.
#36465
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
93e5224
Fix target definitions.
9d1acfd
Fix failures after a recent HW changes.
bb8cab8
Add a const getter for `ReturnTypeDesc` from a call.
2a7647f
Refactor `HasMultiRegRetVal` and `impFixupCallStructReturn`.
7856087
Delete an extra `.` in some dumps.
81dda67
Add an additional check that `ReturnTypeDesc` is initialized.
25b005b
Remove old `const_cast` around `GetReturnTypeDesc`.
82ee494
Replace non-const `GetReturnTypeDesc` with other methods.
1bdda32
Fix uninitialized `gtSpillFlags, gtOtherRegs, gtReturnTypeDesc` in `f…
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
Refactor
HasMultiRegRetVal and impFixupCallStructReturn.
Delete an unnecessary nested condition and make checks more straightforward.
- Loading branch information
There are no files selected for viewing
This file contains hidden or 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 hidden or 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
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.
Uh oh!
There was an error while loading. Please reload this page.
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.
@CarolEidt I have changed that function and added
GetReturnTypeDescuse here. The function is declared asconst, so I had to addGetReturnTypeDesc() constversion. WithGetReturnTypeDescI can distinguish structs that are returned in one register from multireg calls.Non-const version is also needed, we sometimes do initialization as
I did not like that I had two identical implementations, but they are too small to do
const_casttrick (and it is also not considered "right" for that nowadays, see https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#example-210). So I tried to create two new methods instead:call->InitializeLongReturnType()andcall->InitializeStructReturnType()but it looked less clear after I implemented 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.
I don't feel strongly about this, and would not hold up this PR for it, but I think I prefer your alternate solution (having methods defined on the call node), or at least use different names (I guess I disagree with the C++ experts on that point).
If you leave them as-is, it would be worth a comment.
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.
Thanks for making that change!