diff options
| author | Nilstrieb <48135649+Nilstrieb@users.noreply.github.com> | 2023-04-30 22:00:16 +0200 |
|---|---|---|
| committer | Nilstrieb <48135649+Nilstrieb@users.noreply.github.com> | 2023-05-09 07:10:47 +0000 |
| commit | 41a9cbeb64f486a27f5b22a6b1dafa9d693c0fb6 (patch) | |
| tree | 5a6e80ab8498db5af076c0eceb78b08fe7d5b279 /compiler/rustc_codegen_llvm/src/allocator.rs | |
| parent | 33a01e2e93bfdd0c37649c6f82172644b8315b55 (diff) | |
| download | rust-41a9cbeb64f486a27f5b22a6b1dafa9d693c0fb6.tar.gz rust-41a9cbeb64f486a27f5b22a6b1dafa9d693c0fb6.zip | |
Shrink `SelectionError` a lot
`SelectionError` used to be 80 bytes (on 64 bit). That's quite big. Especially because the selection cache contained `Result<_, SelectionError>. The Ok type is only 32 bytes, so the 80 bytes significantly inflate the size of the cache. Most variants of the `SelectionError` seem to be hard errors, only `Unimplemented` shows up in practice (for cranelift-codegen, it occupies 23.4% of all cache entries). We can just box away the biggest variant, `OutputTypeParameterMismatch`, to get the size down to 16 bytes, well within the size of the Ok type inside the cache.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/allocator.rs')
0 files changed, 0 insertions, 0 deletions
