This PR implements part of #54089. The change made in this PR is to no longer duplicate #[inline]
functions per CGU which uses them in debug builds (the current behavior is unaffected for builds requesting optimization of any level).
I would like to go ahead and merge because even with the regressions:
There are improvements on real world crates: -35% on regex-debug, -12% on encoding-debug, -4.5% on ripgrep-debug,
The strategy above is logically better than the current state as we hand less code to LLVM overall. The regressions seen below are related to other, existing issues with CGU partitioning not caused by this change.
Test case | Regressed due to CGU issue 1 | Regressed due to CGU issue 2 | Is very small benchmark |
---|---|---|---|
clap-rs-debug incr-patched: println | ![]() |
||
issue-46449-debug (all) | ![]() |
![]() |
|
webrender-wrench-debug (all) | ![]() |
||
tokio-webpush-simple-debug | ![]() |
![]() |
|
regression-31157-debug full & incr-full | ![]() |
![]() |
|
deeply-nested-debug incr-full | ![]() |
![]() |
|
cargo-debug (all) | ![]() |
||
hyper-2-debug full | ![]() |
||
hyper-2-debug incr-full | ![]() |
||
futures-debug full | ![]() |
![]() |
|
futures-debug incr-full | ![]() |
![]() |
|
webrender-debug full & incr-full | ![]() |
This is the known issue where small changes to MIR size or anything else that could effect the size estimate for a CGU (such as including more functions or even removing some previously included functions) can cause CGUs to be partitioned differently which can have major implications on LLVM performance.
You can tell this is happening when the codegen_module
and related queries are run more frequently in the detailed self-profile data.
What seems to be happening here is that the same number of CGUs are executed, but they contain different sets of functions which leads to LLVM doing more work in some cases.
I don't believe this is a serious issue since innocuous changes like regoranizing modules can cause exactly the same effect.
codegen_copy_artifacts_from_incr_cache
called two more times than previously (~1% more than previously which matches the ~1% regression).or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Syncing