about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2021-12-23 17:48:31 +0100
committerGitHub <noreply@github.com>2021-12-23 17:48:31 +0100
commit8a61ae0479ddfb14005d0f1502515ed93be1d1ac (patch)
tree50ac72acd490adbf7c52aad5cdfaceba311188a3 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parentcf7ee6974e01aa90881dcd043628db0ef32156c4 (diff)
parentcac431ba750c4f079690731b976bc67d979cb8e3 (diff)
downloadrust-8a61ae0479ddfb14005d0f1502515ed93be1d1ac.tar.gz
rust-8a61ae0479ddfb14005d0f1502515ed93be1d1ac.zip
Rollup merge of #92203 - Aaron1011:mir-adt-def, r=oli-obk
Store a `DefId` instead of an `AdtDef` in `AggregateKind::Adt`

The `AggregateKind` enum ends up in the final mir `Body`. Currently,
any changes to `AdtDef` (regardless of how significant they are)
will legitimately cause the overall result of `optimized_mir` to change,
invalidating any codegen re-use involving that mir.

This will get worse once we start hashing the `Span` inside `FieldDef`
(which is itself contained in `AdtDef`).

To try to reduce these kinds of invalidations, this commit changes
`AggregateKind::Adt` to store just the `DefId`, instead of the full
`AdtDef`. This allows the result of `optimized_mir` to be unchanged
if the `AdtDef` changes in a way that doesn't actually affect any
of the MIR we build.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions