Skip to content

Various codegen_llvm cleanups#138674

Merged
bors merged 8 commits into
rust-lang:masterfrom
oli-obk:llvm-cleanups
Mar 19, 2025
Merged

Various codegen_llvm cleanups#138674
bors merged 8 commits into
rust-lang:masterfrom
oli-obk:llvm-cleanups

Conversation

@oli-obk

@oli-obk oli-obk commented Mar 18, 2025

Copy link
Copy Markdown
Contributor

Mostly just adding safe wrappers and deduplicating code

@rustbot

rustbot commented Mar 18, 2025

Copy link
Copy Markdown
Collaborator

r? @compiler-errors

rustbot has assigned @compiler-errors.
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

@rustbot rustbot added 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 Mar 18, 2025

@compiler-errors compiler-errors left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

r=me when green

@oli-obk

oli-obk commented Mar 18, 2025

Copy link
Copy Markdown
Contributor Author

@bors r=compiler-errors

@bors

bors commented Mar 18, 2025

Copy link
Copy Markdown
Collaborator

📌 Commit f4b0984 has been approved by compiler-errors

It is now in the queue for this repository.

@bors

bors commented Mar 18, 2025

Copy link
Copy Markdown
Collaborator

🌲 The tree is currently closed for pull requests below priority 100. This pull request will be tested once the tree is reopened.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 18, 2025
@oli-obk

oli-obk commented Mar 18, 2025

Copy link
Copy Markdown
Contributor Author

@bors rollup

bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 19, 2025
…iaskrgr

Rollup of 10 pull requests

Successful merges:

 - rust-lang#136177 (clarify BufRead::{fill_buf, consume} docs)
 - rust-lang#138654 (Remove the regex dependency from coretests)
 - rust-lang#138655 (rustc-dev-guide sync)
 - rust-lang#138656 (Remove double nesting in post-merge workflow)
 - rust-lang#138658 (CI: mirror alpine and centos images to ghcr)
 - rust-lang#138659 (coverage: Don't store a body span in `FunctionCoverageInfo`)
 - rust-lang#138661 (Revert: Add *_value methods to proc_macro lib)
 - rust-lang#138670 (Remove existing AFIDT implementation)
 - rust-lang#138674 (Various codegen_llvm cleanups)
 - rust-lang#138684 (use then in docs for `fuse` to enhance readability)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 5661e98 into rust-lang:master Mar 19, 2025
@rustbot rustbot added this to the 1.87.0 milestone Mar 19, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Mar 19, 2025
Rollup merge of rust-lang#138674 - oli-obk:llvm-cleanups, r=compiler-errors

Various codegen_llvm cleanups

Mostly just adding safe wrappers and deduplicating code
let actual_type_di_node = type_di_node(cx, actual_type);
Some(cx.create_template_type_parameter(name.as_str(), actual_type_di_node))
})
let generics = cx.tcx.generics_of(def.did());

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This generics_of is now called unconditionally and is likely the source of the perf regression

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Turns out that wasn't it

@oli-obk oli-obk deleted the llvm-cleanups branch March 20, 2025 13:57
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 20, 2025
Guard a query invocation out of perf reasons

Should fix the perf regression from rust-lang#138674
&name_in_debuginfo,
&work_dir,
"",
llvm::ChecksumKind::None,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Maybe this. Empty string now, null pointer before

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

But that wouldn't explain the query count changes

bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 21, 2025
Avoid sending a non-null pointer for empty strings

Another try at fixing the perf regression from rust-lang#138674

r? `@ghost`
@panstromek

Copy link
Copy Markdown
Contributor

Perf triage:

What's the status of this regression? Last attempt I saw is #138775, any developments since that or do we want to revert?

@oli-obk

oli-obk commented Mar 31, 2025

Copy link
Copy Markdown
Contributor Author

I'm gonna have try to revert individual commits and see which one actually caused the regression

github-actions Bot pushed a commit to model-checking/verify-rust-std that referenced this pull request Apr 2, 2025
…iaskrgr

Rollup of 10 pull requests

Successful merges:

 - rust-lang#136177 (clarify BufRead::{fill_buf, consume} docs)
 - rust-lang#138654 (Remove the regex dependency from coretests)
 - rust-lang#138655 (rustc-dev-guide sync)
 - rust-lang#138656 (Remove double nesting in post-merge workflow)
 - rust-lang#138658 (CI: mirror alpine and centos images to ghcr)
 - rust-lang#138659 (coverage: Don't store a body span in `FunctionCoverageInfo`)
 - rust-lang#138661 (Revert: Add *_value methods to proc_macro lib)
 - rust-lang#138670 (Remove existing AFIDT implementation)
 - rust-lang#138674 (Various codegen_llvm cleanups)
 - rust-lang#138684 (use then in docs for `fuse` to enhance readability)

r? `@ghost`
`@rustbot` modify labels: rollup
@petrochenkov

Copy link
Copy Markdown
Contributor

Reverted in #139874

@Kobzol

Kobzol commented Apr 22, 2025

Copy link
Copy Markdown
Member

FWIW, next time we see a regression this big, we should IMO revert immediately. It's too easy for something like this to fall through the cracks, and reverting later is more annoying, due to needing backports, more conflicts to be resolved etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

7 participants