Skip to content

[opt] Use static arrays instead of std::vector to store legacy pass names. NFC #83634

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 3, 2024

Conversation

topperc
Copy link
Collaborator

@topperc topperc commented Mar 1, 2024

A std::vector causes a heap allocation and a memcpy of static initialization data from the rodata section.

Use a static array instead so we can use the static data directly.

…ames.

A std::vector causes a heap allocation and a memcpy of static
initialization data from the rodata section.

Use a static array instead so we can use the static data directly.
@topperc topperc requested review from nico, nikic and MaskRay March 1, 2024 23:42
@topperc topperc merged commit 8fccf6b into llvm:main Mar 3, 2024
@topperc topperc deleted the pr/opt-static-array branch March 3, 2024 01:47
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