Skip to content

[IRGen] Lowered tuple_pack_element_addr. #63532

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

Conversation

nate-chandler
Copy link
Contributor

Generalized preexisting loadTupleOffsetFromMetadata function to take an llvm::Value * rather than an unsigned and used it to get the offset specified by the dynamic index.

Refactored the preexisting function loadTupleOffsetFromMetadata--which
took an unsigned index and constructed an llvm::Value from it--to
instead take a llvm::Value.  Preserved the old overload to just pass
through to the refactored function.
@nate-chandler nate-chandler force-pushed the variadic-generics/irgen/tuple_pack_element_addr branch from d3cf221 to d023e02 Compare February 9, 2023 03:59
@nate-chandler
Copy link
Contributor Author

@swift-ci please test

Copy link
Contributor

@rjmccall rjmccall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM except for one complaint about the test

@nate-chandler nate-chandler force-pushed the variadic-generics/irgen/tuple_pack_element_addr branch from d023e02 to 7acc339 Compare February 9, 2023 15:16
@nate-chandler
Copy link
Contributor Author

@swift-ci please smoke test and merge

@swift-ci swift-ci merged commit f22d6d7 into swiftlang:main Feb 9, 2023
@compnerd
Copy link
Member

I think that this is causing instability on Windows due to stack corruption.

@nate-chandler
Copy link
Contributor Author

@compnerd Any idea how that might be happening? I was hoping it was NFC for non-variadic-generic code.

@compnerd
Copy link
Member

That would be due to the use of the Twine. The simplest thing is to give up and call Saul malloc. That is, we should just provide storage for the name by means of std::string. See #63635.

@nate-chandler
Copy link
Contributor Author

Thanks, @compnerd !

@nate-chandler nate-chandler deleted the variadic-generics/irgen/tuple_pack_element_addr branch July 5, 2023 23:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants