Skip to content
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

Reuse temp variables in Row Constructor code #22003

Merged

Conversation

pettyjamesm
Copy link
Member

Description

Allows reusing temporary variables with the same on-stack type across fields in RowConstructorCodeGenerator. This approach is already taken in the large row codepath and can reduce the generated code size when multiple fields have the same matching type.

Additional context and related issues

Related change in PR airlift/bytecode#18 so that this style of variable reuse can be extended to share temp variables between different code generators producing code within the same method scope.

Release notes

(x) This is not user-visible or is docs only, and no release notes are required.
( ) Release notes are required. Please propose a release note for me.
( ) Release notes are required, with the following suggested text:

Allows reusing temporary variables with the same on-stack type across
fields in RowConstructorCodeGenerator. This approach is already taken in
the large row codepath and can reduce the generated code size when
multiple fields have the same matching type.
@cla-bot cla-bot bot added the cla-signed label May 16, 2024
@pettyjamesm pettyjamesm requested review from dain and electrum May 16, 2024 17:58
@pettyjamesm pettyjamesm merged commit ed9d135 into trinodb:master May 16, 2024
94 checks passed
@pettyjamesm pettyjamesm deleted the reuse-variables-in-row-constructor branch May 16, 2024 22:22
@github-actions github-actions bot added this to the 449 milestone May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants