Skip to content

[PowerPC] Do not string pool globals that are part of llvm used. #66848

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

stefanp-synopsys
Copy link
Contributor

The string pooling pass was incorrectly pooling global varables that were part of llvm.used or llvm.compiler.used. This patch fixes the pass to prevent that by checking each candidate to make sure that it is not in either of those lists.

Copy link
Collaborator

@hubert-reinterpretcast hubert-reinterpretcast left a comment

Choose a reason for hiding this comment

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

LGTM; thanks!

Copy link
Contributor

@amy-kwan amy-kwan left a comment

Choose a reason for hiding this comment

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

LGTM.

Copy link
Contributor

@lei137 lei137 left a comment

Choose a reason for hiding this comment

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

LGTM

@llvm.used = appending global [1 x ptr] [ptr @keep_this], section "llvm.metadata"
@llvm.compiler.used = appending global [1 x ptr] [ptr @keep_this2], section "llvm.metadata"

declare signext i32 @callee(ptr noundef) local_unnamed_addr
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think local_unnamed_addr does anything here does it? If not can we remove that and the #0 from blow. Thx

@stefanp-synopsys stefanp-synopsys force-pushed the stefanp/StringPoolingUsedFix branch from 5ae27d2 to d03571a Compare November 24, 2023 15:38
Copy link

github-actions bot commented Nov 24, 2023

✅ With the latest revision this PR passed the C/C++ code formatter.

The string pooling pass was incorrectly pooling global varables that
were part of llvm.used or llvm.compiler.used. This patch fixes the pass
to prevent that by checking each candidate to make sure that it is not
in either of those lists.
@stefanp-synopsys stefanp-synopsys force-pushed the stefanp/StringPoolingUsedFix branch from d03571a to 0383c03 Compare November 24, 2023 17:10
@stefanp-synopsys stefanp-synopsys merged commit d896b1f into llvm:main Nov 24, 2023
Guzhu-AMD pushed a commit to GPUOpen-Drivers/llvm-project that referenced this pull request Nov 30, 2023
Local branch amd-gfx 741a0a2 Merged main:d9962c400f97 into amd-gfx:8bf360256d7b
Remote branch main d896b1f [PowerPC] Do not string pool globals that are part of llvm used. (llvm#66848)
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