Significant Increase in Fat LTO Time Post Update to rustc 1.75.0-nightly

perf result for c23cf1f1ae4b4f214b1f56682785fe158af01c1c

Thanks for testing! This confirms that the fix works, so I've submitted it upstream as [GlobalOpt] Cache whether CC is changeable by nikic ยท Pull Request #71381 ยท llvm/llvm-project ยท GitHub.

For the remaining SLPVectorizer issue, it's not really possible to understand the root cause without a test case. Something you could try is to add -Cllvm-args=-slp-max-vf=200 to RUSTFLAGS and see whether that helps.

3 Likes

After adding -Cllvm-args=-slp-max-vf=200:

===-------------------------------------------------------------------------===
                          Pass execution timing report
===-------------------------------------------------------------------------===
  Total Execution Time: 1175.9350 seconds (1175.8385 wall clock)

   ---User Time---   --System Time--   --User+System--   ---Wall Time---  --- Name ---
  551.0560 ( 47.9%)   0.6698 (  2.5%)  551.7258 ( 46.9%)  551.7250 ( 46.9%)  SLPVectorizerPass
  152.6149 ( 13.3%)   3.6148 ( 13.6%)  156.2297 ( 13.3%)  156.2006 ( 13.3%)  InstCombinePass
  105.5270 (  9.2%)   1.6281 (  6.1%)  107.1551 (  9.1%)  107.1473 (  9.1%)  GVNPass
  48.7491 (  4.2%)   2.7861 ( 10.5%)  51.5352 (  4.4%)  51.5276 (  4.4%)  InlinerPass
  35.7035 (  3.1%)   3.5199 ( 13.2%)  39.2235 (  3.3%)  39.2242 (  3.3%)  IPSCCPPass
  31.6451 (  2.8%)   0.3663 (  1.4%)  32.0115 (  2.7%)  32.0074 (  2.7%)  DSEPass
  29.9858 (  2.6%)   1.8889 (  7.1%)  31.8747 (  2.7%)  31.8752 (  2.7%)  GlobalOptPass
  23.2393 (  2.0%)   1.4679 (  5.5%)  24.7073 (  2.1%)  24.7075 (  2.1%)  CalledValuePropagationPass

Thank you for your efforts and for submitting the fix upstream. I'm eager to know, is there a typical schedule or estimated timeframe for when this PR might be merged into the Rust nightly channel? Any information on this would be greatly appreciated.

If it was just merged it will be in tomorrow's nightly. If I am reading https://forge.rust-lang.org/ correctly nightly will have version 1.75. It will be on the stable channel December 28 2023.

It's a patch to llvm master. It won't be available in rust until the next major llvm version unless it gets backported.

7 Likes

The change is part of the LLVM update at Update to LLVM 17.0.5 by nikic ยท Pull Request #117907 ยท rust-lang/rust ยท GitHub. So once that lands it will be in the next nightly.

5 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.