Skip to content

[GlobalMerge] Use vector::assign in place of fill+resize. NFC #85723

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 1 commit into from
Mar 19, 2024

Conversation

topperc
Copy link
Collaborator

@topperc topperc commented Mar 19, 2024

Noticed while reviewing the code.

If the resize causes a new allocation, this will fill the new allocation with zeroes directly. Previously, we would fill the old allocation with zeroes, then copy them to the new allocation before filling the additional space with zeros.

Noticed while reviewing the code.

If the resize causes a new allocation, this will fill the new
allocation with zeroes directly. Previously, we would fill the old
allocation with zeroes, then copy them to the new allocation before
filling the additional space with zeros.
Copy link
Collaborator

@efriedma-quic efriedma-quic left a comment

Choose a reason for hiding this comment

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

LGTM

@topperc topperc merged commit e04dd68 into llvm:main Mar 19, 2024
@topperc topperc deleted the pr/global-merge-assign branch March 19, 2024 04:14
chencha3 pushed a commit to chencha3/llvm-project that referenced this pull request Mar 23, 2024
…5723)

Noticed while reviewing the code.

If the resize causes a new allocation, this will fill the new allocation
with zeroes directly. Previously, we would fill the old allocation with
zeroes, then copy them to the new allocation before filling the
additional space with zeros.
qiaojbao pushed a commit to GPUOpen-Drivers/llvm-project that referenced this pull request May 15, 2024
…5e3593208

Local branch amd-gfx 26b5e35 Merged main:5373daad9492e157c0c1ad496334f5dfd78d7da0 into amd-gfx:0ab8eb800a42
Remote branch main e04dd68 [GlobalMerge] Use vector::assign in place of fill+resize. NFC (llvm#85723)
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