Skip to content

LLVM 23: Run AssignGUIDPass in some places#157055

Open
TimNN wants to merge 1 commit into
rust-lang:mainfrom
TimNN:guid
Open

LLVM 23: Run AssignGUIDPass in some places#157055
TimNN wants to merge 1 commit into
rust-lang:mainfrom
TimNN:guid

Conversation

@TimNN
Copy link
Copy Markdown
Contributor

@TimNN TimNN commented May 28, 2026

llvm/llvm-project#184065 introduced the new pass.

I'm not 100% confident that this is the correct patch, but it makes all the previously failing run-make "lto" tests pass on my machine.

I added the pass to the if (NeedThinLTOBufferPasses) section to match the addRequiredLTOPreLinkPasses changes from the LLVM PR, and to the LLVMRustModuleSerialize section based on the stack trace of an LLVM assertion.

The IR may now contain an additional !guid attribute, requiring some codegen test expectations to be updated. I mostly followed the pattern from the LLVM PR, and removed trailing {s. (For both, tests that were failing locally, as well as potentially problematic expectations identified via grep, in case the test wasn't being run locally).

@rustbot label llvm-main

@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels May 28, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented May 28, 2026

r? @cuviper

rustbot has assigned @cuviper.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @cuviper

@rustbot rustbot added the llvm-main Marks PRs that are making Rust work with LLVM main (this label is consumed by CI tooling) label May 28, 2026
@TimNN TimNN marked this pull request as draft May 28, 2026 11:14
@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 28, 2026
@TimNN
Copy link
Copy Markdown
Contributor Author

TimNN commented May 28, 2026

Some FileCheck tests also need to be updated since the generated IR can now include !guid annotations.

@rustbot rustbot added the PG-exploit-mitigations Project group: Exploit mitigations label May 28, 2026
@TimNN TimNN marked this pull request as ready for review May 28, 2026 13:00
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented May 28, 2026

Some changes occurred in tests/codegen-llvm/sanitizer

cc @rcvalle

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels May 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. llvm-main Marks PRs that are making Rust work with LLVM main (this label is consumed by CI tooling) PG-exploit-mitigations Project group: Exploit mitigations S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants