Skip to content

[SIL] NFC: remove TailAllocatedOperandList template #13628

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

Conversation

davezarzycki
Copy link
Contributor

@davezarzycki davezarzycki commented Dec 27, 2017

Introduces InstructionBaseWithTrailingOperands to wrap llvm::TrailingObjects and remove TailAllocatedOperandList, which is less safe, less feature rich, and less space efficient when compared to the LLVM type. This new template also helps automate boilerplate logic like getAllOperands() and Operand destruction.

Refactor UnaryInstructionWithTypeDependentOperandsBase into two template
classes, where the original template now subclasses a simpler template
called "InstructionBaseWithTrailingObjects".
Also, repack misc bits and stop hard coding the number of fixed operands.
Please use InstructionBaseWithTrailingOperands template now. It is more type safe and more space efficient.
@davezarzycki
Copy link
Contributor Author

@swift-ci please test and merge

@swift-ci swift-ci merged commit 4d83e8c into swiftlang:master Dec 27, 2017
@davezarzycki davezarzycki deleted the sil_nfc_remove_TailAllocatedOperandList branch December 27, 2017 20:52
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.

2 participants