Repository navigation
Conversation
552bbf6 to
9ea4eb0
Compare
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Mark functions nounwind when their body proves an unwind cannot escape
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (a69e4b3): comparison URL. Overall result: ❌✅ regressions and improvements - please read:Benchmarking means the PR may be perf-sensitive. It's automatically marked not fit for rolling up. Overriding is possible but disadvised: it risks changing compiler perf. Next, please: If you can, justify the regressions found in this try perf run in writing along with @bors rollup=never rustc-perf Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary 2.4%, secondary -0.2%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary 2.3%, secondary -1.1%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (primary -0.5%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 487.539s -> 489.35s (0.37%) |
|
It appears that excluding generic functions results in negligible size gains, while also introducing numerous regressions. I am currently extending the analysis to include generic functions; once I have the results from another |
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
Mark functions nounwind when their body proves an unwind cannot escape
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (19464f8): comparison URL. Overall result: ❌✅ regressions and improvements - please read:Benchmarking means the PR may be perf-sensitive. It's automatically marked not fit for rolling up. Overriding is possible but disadvised: it risks changing compiler perf. Next, please: If you can, justify the regressions found in this try perf run in writing along with @bors rollup=never rustc-perf Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary 2.4%, secondary -1.5%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary -2.3%, secondary -3.5%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (primary -0.4%, secondary -0.3%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 480.462s -> 480.233s (-0.05%) |
|
A few results on aarch64 are not quite as good as expected. I need to investigate whether certain call sites along the aarch64 code path are repeatedly querying the function ABI, or if the cache for |
|
In my local testing, I discovered an issue likely caused by the inlining threshold. The values shifted from 465 to 245 on aarch64, and from 475 to 255 on x86_64. Since the cutoff for inlining is 250, this 220-unit reduction resulted in one case falling below the threshold, while the other remained above it. For further details, please refer to the discussion on Zulip. |
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
Mark functions nounwind when their body proves an unwind cannot escape
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (f1af851): comparison URL. Overall result: ❌✅ regressions and improvements - please read:Benchmarking means the PR may be perf-sensitive. It's automatically marked not fit for rolling up. Overriding is possible but disadvised: it risks changing compiler perf. Next, please: If you can, justify the regressions found in this try perf run in writing along with @bors rollup=never rustc-perf Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary 2.2%, secondary -0.8%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary -2.2%, secondary -1.7%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (primary -0.2%, secondary -0.2%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 485.883s -> 481.907s (-0.82%) |
View all comments
This draft adds a query that walks
optimized_mir. A call is judged by its callee, a drop by its glue, and the answer is a fixpoint over the call graph in which a cycle yields no proof; false means "no proof was found" rather than "this unwinds", so everything the analysis cannot resolve keeps today's behaviour. The result feedsfn_abi_of_instance, and the existing machinery does the rest: the unwind edges become unreachable and the call is emitted as a plain call carryingnounwindon both the definition and the call site. Answers reach downstream crates through the crate metadata as one bit perDefIndex, truncated after the last proven one, which bumps the metadata version; incremental builds write nothing and keep the current behaviour, as do builds without optimizations.This version of the analysis runs on optimized generics; consequently, it gives up in three scenarios: when the arguments to a call still contain type parameters, when a type being dropped contains type parameters, or when a trait method resolution fails to yield a unique implementation. For generic functions, at least one of these conditions is almost always met, meaning that, in practice, the analysis can currently only provide proofs for non-generic functions.
I now need a
rust-perftool to assess the impact of my current changes on the performance and binary size of rustc.