]> git.lizzy.rs Git - rust.git/commit - src/tools/clippy
Rollup merge of #62692 - eddyb:precompute-niches, r=oli-obk
authorMazdak Farrokhzad <twingoow@gmail.com>
Fri, 26 Jul 2019 16:56:41 +0000 (18:56 +0200)
committerGitHub <noreply@github.com>
Fri, 26 Jul 2019 16:56:41 +0000 (18:56 +0200)
commit9d122670fdac45bbc4c06c9df56f1a28541659c7
tree1e30ca5f6a76e41822db62e3682d447102be30c2
parentd1f86c13e4363e981c7d52312d24d00a24f6bd7f
parent88eced596199548a7653aaf835cda0a93fec36fd
Rollup merge of #62692 - eddyb:precompute-niches, r=oli-obk

rustc: precompute the largest Niche and store it in LayoutDetails.

Since we only ever can use at most one niche, it makes sense to just store that in the layout, for the simplest caching (especially as it's almost trivial to compute).

There might be a speedup from this, but even if it's marginal now, the caching would be a more significant benefit for future optimization attempts.