about summary refs log tree commit diff
path: root/compiler/rustc_passes/src/reachable.rs
AgeCommit message (Collapse)AuthorLines
2024-07-02Miri function identity hack: account for possible inliningRalf Jung-1/+1
2024-06-28Revert "Rollup merge of #126938 - RalfJung:link_section, r=compiler-errors"Rémy Rakic-2/+10
This reverts commit 5c4ede88c61e746ed5c852d7a7e38ab1a824ae52, reversing changes made to 95332b89187bb6a0c910574cfeff1933b619565a.
2024-06-25miri: make sure we can find link_section statics even for the local crateRalf Jung-10/+2
2024-06-11reachable computation: clarify comments around constsRalf Jung-6/+9
2024-06-05Also support generic constantsOli Scherer-9/+9
2024-06-05Don't walk the bodies of free constants for reachability.Oli Scherer-4/+14
2024-06-04Closures are recursively reachableTomasz Miąsko-0/+1
2024-05-23Remove `#[macro_use] extern crate tracing` from `rustc_passes`.Nicholas Nethercote-0/+1
2024-05-09reachable computation: extend explanation of what this does, and whyRalf Jung-10/+22
2024-04-29Remove `extern crate rustc_middle` from numerous crates.Nicholas Nethercote-0/+1
2024-03-28Rollup merge of #123063 - tmiasko:reachability-abi, r=michaelwoeristerMatthias Krüger-12/+1
Function ABI is irrelevant for reachability
2024-03-25Rollup merge of #122769 - RalfJung:reachable, r=tmiaskoJubilee-23/+49
extend comments for reachability set computation I hope this is right. :) Please review carefully. r? ``@tmiasko`` Cc ``@oli-obk`` ``@saethlin``
2024-03-25extend doc comment for reachability set computationRalf Jung-23/+49
also extend the const fn reachability test
2024-03-25Function ABI is irrelevant for reachabilityTomasz Miąsko-12/+1
2024-03-21rename items -> free_itemsRalf Jung-1/+1
2024-03-19The AssocOpaqueTy HIR node is not actually needed to differentiate from ↵Oli Scherer-1/+1
other hir nodes that were fed
2024-03-16Auto merge of #122371 - oli-obk:visit_nested_body, r=tmiaskobors-39/+79
Stop walking the bodies of statics for reachability, and evaluate them instead cc `@saethlin` `@RalfJung` cc #119214 This reuses the `DefIdVisitor` from `rustc_privacy`, because they basically try to do the same thing. This PR's changes can probably be extended to constants, too, but let's tackle that separately, it's likely more involved.
2024-03-14hir: Remove `opt_local_def_id_to_hir_id` and `opt_hir_node_by_def_id`Vadim Petrochenkov-9/+6
Also replace a few `hir_node()` calls with `hir_node_by_def_id()`
2024-03-14Test and implement reachability for trait objects and generic parameters of ↵Oli Scherer-4/+31
functions
2024-03-14Stop walking the bodies of statics for reachability, and evaluate them insteadOli Scherer-38/+51
2024-03-13Create some minimal HIR for associated opaque typesVadim Petrochenkov-1/+2
2024-03-12Ensure nested allocations in statics do not get deduplicatedOli Scherer-1/+38
2024-03-12Change `DefKind::Static` to a struct variantOli Scherer-1/+1
2023-12-12Move some methods from `tcx.hir()` to `tcx`zetanumbers-2/+2
Renamings: - find -> opt_hir_node - get -> hir_node - find_by_def_id -> opt_hir_node_by_def_id - get_by_def_id -> hir_node_by_def_id Fix rebase changes using removed methods Use `tcx.hir_node_by_def_id()` whenever possible in compiler Fix clippy errors Fix compiler Apply suggestions from code review Co-authored-by: Vadim Petrochenkov <vadim.petrochenkov@gmail.com> Add FIXME for `tcx.hir()` returned type about its removal Simplify with with `tcx.hir_node_by_def_id`
2023-11-26rustc: `hir().local_def_id_to_hir_id()` -> `tcx.local_def_id_to_hir_id()` ↵Vadim Petrochenkov-3/+1
cleanup
2023-10-17Automatically enable cross-crate inlining for small functionsBen Kimock-50/+8
2023-10-13Format all the let chains in compilerMichael Goulet-1/+3
2023-09-10Encode only MIR that can be used by other cratesTomasz Miąsko-0/+4
Only reachable items might participate in the code generation in the downstream crates. Omit redundant optimized MIR of unreachable items from a crate metadata. Additionally, include reachable closures in reachable set, so that unreachable closures can be omitted on the same basis.
2023-08-22Contents of reachable statics is reachableTomasz Miąsko-7/+3
2023-08-09rustc: Move `crate_types` from `Session` to `GlobalCtxt`Vadim Petrochenkov-4/+4
Removes a piece of mutable state. Follow up to #114578.
2023-07-28Lower generic const items to HIRLeón Orell Valerian Liehr-1/+1
2023-05-15Move expansion of query macros in rustc_middle to rustc_middle::queryJohn Kåre Alsaker-1/+1
2023-03-08Auto merge of #108312 - michaelwoerister:hash-set-not-hash-stable, r=eholkbors-4/+4
Do not implement HashStable for HashSet (MCP 533) This PR removes all occurrences of `HashSet` in query results, replacing it either with `FxIndexSet` or with `UnordSet`, and then removes the `HashStable` implementation of `HashSet`. This is part of implementing [MCP 533](https://github.com/rust-lang/compiler-team/issues/533), that is, removing the `HashStable` implementations of all collection types with unstable iteration order. The changes are mostly mechanical. The only place where additional sorting is happening is in Miri's override implementation of the `exported_symbols` query.
2023-03-02rustc_middle: Remove trait `DefIdTree`Vadim Petrochenkov-1/+1
This trait was a way to generalize over both `TyCtxt` and `Resolver`, but now `Resolver` has access to `TyCtxt`, so this trait is no longer necessary.
2023-03-01Use LocalDefIdSet instead of FxHashSet for reachable_set query.Michael Woerister-4/+4
2023-02-14Do not fetch HIR for reachable.Camille GILLOT-16/+13
2023-02-14Add `of_trait` to DefKind::Impl.Camille GILLOT-1/+1
2022-12-20rustc: Remove needless lifetimesJeremy Stucki-2/+2
2022-11-28Statics used in reachable function's inline asm are reachableTomasz Miąsko-0/+11
2022-10-29Improve LanguageItems apiCameron Steffen-5/+3
2022-10-29Rename some `OwnerId` fields.Nicholas Nethercote-10/+10
spastorino noticed some silly expressions like `item_id.def_id.def_id`. This commit renames several `def_id: OwnerId` fields as `owner_id`, so those expressions become `item_id.owner_id.def_id`. `item_id.owner_id.local_def_id` would be even clearer, but the use of `def_id` for values of type `LocalDefId` is *very* widespread, so I left that alone.
2022-10-26privacy: Rename "accessibility levels" to "effective visibilities"Vadim Petrochenkov-7/+7
And a couple of other naming tweaks Related to https://github.com/rust-lang/rust/issues/48054
2022-10-09ImplItemKind::TyAlias => ImplItemKind::TypeMichael Goulet-2/+2
2022-09-24separate definitions and `HIR` ownersTakayuki Maeda-7/+7
fix a ui test use `into` fix clippy ui test fix a run-make-fulldeps test implement `IntoQueryParam<DefId>` for `OwnerId` use `OwnerId` for more queries change the type of `ParentOwnerIterator::Item` to `(OwnerId, OwnerNode)`
2022-09-14change AccessLevels representationBryanskiy-2/+8
2022-07-12Add an indirection for closures in `hir::ExprKind`Maybe Waffle-1/+4
This helps bring `hir::Expr` size down, `Closure` was the biggest variant, especially after `for<>` additions.
2022-06-18Remove a possible unnecessary assignmentYuki Okushi-2/+0
The reference issue has been closed (the feature has been stabilized) and things work fine without fine, it seems. Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2022-06-12Make `ExprKind::Closure` a struct variant.Camille GILLOT-1/+1
2022-06-03Encode MIR for 'unreachable' non-generic fnsMichael Goulet-25/+8
2022-05-13check def_kind before fetching itemMiguel Guarniz-21/+27
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>