about summary refs log tree commit diff
path: root/compiler/rustc_data_structures/src
AgeCommit message (Collapse)AuthorLines
2023-06-29Remove `SmallStr`.Nicholas Nethercote-89/+0
It no longer has any uses. If it's needed in the future, it can be easily reinstated. Or a crate such as `smallstr` can be used, much like we use `smallvec`.
2023-06-21Rollup merge of #112538 - ndrewxie:issue-84447-partial-1, r=compiler-errorsGuillaume Gomez-4/+4
Removed unnecessary &String -> &str, now that &String implements StableOrd as well Applied a few nits suggested by lcnr to PR #110040 (nits can be found [here](https://github.com/rust-lang/rust/pull/110040#pullrequestreview-1469452191).) Making a new PR because the old one was already merged, and given that this just applies changes that were already suggested, reviewing it should be fairly open-and-shut.
2023-06-19Make closure_saved_names_of_captured_variables a query.Camille GILLOT-1/+13
2023-06-11Applied nitsAndrew Xie-4/+4
2023-06-09Don't print Interned or PrivateZstMichael Goulet-1/+7
2023-06-08Removed stable/unstable sort arg from into_sorted_stable_ord, fixed a few ↵Andrew Xie-10/+43
misc issues, added collect to UnordItems
2023-06-05Fixed to_sorted => to_sorted_stable_ordAndrew Xie-0/+11
2023-06-04Fixed unord mistakeAndrew Xie-5/+0
2023-06-04Fixed failing test + minor cleanupAndrew Xie-0/+5
2023-06-02Update dependencies with reported vulnerabilitiesArlo Siemsen-1/+1
bumpalo 3.12.1 (yanked) * updated to 3.13.0 tokio 1.8.4 - https://rustsec.org/advisories/RUSTSEC-2023-0001 * updated to 1.28.2 remove_dir_all 0.5.3 - https://rustsec.org/advisories/RUSTSEC-2023-0018 * removed by using the standard library function in `rust-installer` instead and updating to `tempfile@3.5.0` (which also removes the dependency).
2023-05-31Auto merge of #111076 - ↵bors-3/+8
notriddle:notriddle/silence-private-dep-trait-impl-suggestions, r=cjgillot diagnostics: exclude indirect private deps from trait impl suggest Fixes #88696
2023-05-28Add some commentsJohn Kåre Alsaker-0/+4
2023-05-28Don't access self.mask with a single shardJohn Kåre Alsaker-1/+1
2023-05-28Use only one shard with a single threadJohn Kåre Alsaker-10/+34
2023-05-25rustc_data_structures: sync and atomic consistencyMichael Howell-6/+6
Co-authored-by: @lukas-code
2023-05-25rustc_metadata: specialize private_dep flag with `fetch_and`Michael Howell-13/+4
2023-05-25rustc_metadata: use configurable AtomicBool for privateness flagMichael Howell-0/+14
This switches to using a `Cell` for single-threaded rustc.
2023-05-25Rollup merge of #111875 - WaffleLapkin:defer_on_drop, r=NilstriebMatthias Krüger-10/+16
Don't leak the function that is called on drop It probably wasn't causing problems anyway, but still, a `// this leaks, please don't pass anything that owns memory` is not sustainable. I could implement a version which does not require `Option`, but it would require `unsafe`, at which point it's probably not worth it.
2023-05-24Rollup merge of #111912 - WaffleLapkin:is_some_and_in_the_compiler, ↵Manish Goregaokar-1/+1
r=petrochenkov Use `Option::is_some_and` and `Result::is_ok_and` in the compiler `.is_some_and(..)`/`.is_ok_and(..)` replace `.map_or(false, ..)` and `.map(..).unwrap_or(false)`, making the code more readable. This PR is a sibling of https://github.com/rust-lang/rust/pull/111873#issuecomment-1561316515
2023-05-24Auto merge of #111673 - cjgillot:dominator-preprocess, r=cjgillot,tmiaskobors-10/+85
Preprocess and cache dominator tree Preprocessing dominators has a very strong effect for https://github.com/rust-lang/rust/pull/111344. That pass checks that assignments dominate their uses repeatedly. Using the unprocessed dominator tree caused a quadratic runtime (number of bbs x depth of the dominator tree). This PR also caches the dominator tree and the pre-processed dominators in the MIR cfg cache. Rebase of https://github.com/rust-lang/rust/pull/107157 cc `@tmiasko`
2023-05-24Use `Option::is_some_and` and `Result::is_ok_and` in the compilerMaybe Waffle-1/+1
2023-05-23Don't leak the function that is called on dropMaybe Waffle-10/+16
2023-05-20Auto merge of #111596 - cjgillot:dominator-bucket, r=Mark-Simulacrumbors-8/+35
Process current bucket instead of parent's bucket when starting loop for dominators. The linked paper by Georgiadis suggests in §2.2.3 to process `bucket[w]` when beginning the loop, instead of `bucket[parent[w]]` when finishing it. In the test case, we correctly computed `idom[2] = 0` and `sdom[3] = 1`, but the algorithm returned `idom[3] = 1`, instead of the correct value 0, because of the path 0-7-2-3. This provoked LLVM ICE in https://github.com/rust-lang/rust/pull/111061#issuecomment-1546912112. LLVM checks that SSA assignments dominate uses using its own implementation of Lengauer-Tarjan, and saw case where rustc was breaking the dominance property. r? `@Mark-Simulacrum`
2023-05-18Revert spurious changes.Camille GILLOT-9/+9
2023-05-18Rollup merge of #111707 - nnethercote:rm-WorkerLocal-Vec, r=compiler-errorsDylan DPC-7/+0
Remove unused `impl<T> WorkerLocal<Vec<T>>`. cc ``@SparrowLii`` ``@Zoxc``
2023-05-18Remove unused `impl<T> WorkerLocal<Vec<T>>`.Nicholas Nethercote-7/+0
2023-05-17Merge DominatorTree and Dominators.Camille GILLOT-36/+30
2023-05-17Typo.Camille GILLOT-1/+1
2023-05-17Remove outdated comment.Camille GILLOT-2/+0
2023-05-17Preprocess dominator tree to answer queries in O(1)Tomasz Miąsko-22/+105
2023-05-17Rollup merge of #110145 - WaffleLapkin:share_slice_of_bytes, r=NilstriebDylan DPC-13/+48
Share slice of bytes r? `@Nilstrieb` cc `@noamtashma`
2023-05-16Fixup commentsMaybe Waffle-4/+4
2023-05-16Remove `MetadataRef` type aliasMaybe Waffle-3/+0
2023-05-16Switch `OwnedSlice` to use `Lrc` & remove `Lrc` from `MetadataBlob`Maybe Waffle-4/+43
2023-05-16Merge `MetadataRef` type aliasesMaybe Waffle-4/+3
2023-05-15Process current bucket instead of parent's bucket when starting loop for ↵Camille GILLOT-8/+35
dominators.
2023-05-14Start node has no immediate dominatorTomasz Miąsko-14/+22
Change the immediate_dominator return type to Option, and use None to indicate that node has no immediate dominator. Also fix the issue where the start node would be returned as its own immediate dominator.
2023-05-13Auto merge of #107586 - SparrowLii:parallel-query, r=cjgillotbors-37/+464
Introduce `DynSend` and `DynSync` auto trait for parallel compiler part of parallel-rustc #101566 This PR introduces `DynSend / DynSync` trait and `FromDyn / IntoDyn` structure in rustc_data_structure::marker. `FromDyn` can dynamically check data structures for thread safety when switching to parallel environments (such as calling `par_for_each_in`). This happens only when `-Z threads > 1` so it doesn't affect single-threaded mode's compile efficiency. r? `@cjgillot`
2023-05-12Rollup merge of #111393 - klensy:win-0.48, r=oli-obkMatthias Krüger-2/+4
bump windows crate 0.46 -> 0.48 This drops duped version of crate(0.46), reduces `rustc_driver.dll` ~800kb and reduces exported functions number from 26k to 22k. Also while here, added `tidy-alphabetical` sorting to lists in tidy allowed lists.
2023-05-09bump windows crate 0.46 -> 0.48 in workspaceklensy-2/+4
2023-05-09Rollup merge of #111252 - matthewjasper:min-spec-improvements, r=compiler-errorsDylan DPC-0/+2
Min specialization improvements - Don't allow specialization impls with no items, such implementations are probably not correct and only occur as mistakes in the compiler and standard library - Fix a missing normalization call - Adds spans for lifetime errors from overly general specializations Closes #79457 Closes #109815
2023-05-07Use smaller ints for bitflagsNilstrieb-1/+1
2023-05-06add `DynSend / DynSync` for `CopyTaggedPtr`SparrowLii-5/+8
2023-05-06correct import of owned_sliceSparrowLii-13/+6
2023-05-06correct literals for dyn thread safeSparrowLii-21/+24
2023-05-06rename relative names in `sync`SparrowLii-23/+28
2023-05-06fix `parallel!`SparrowLii-0/+7
2023-05-06fix some nitsSparrowLii-39/+27
2023-05-06introduce `DynSend` and `DynSync` auto traitSparrowLii-39/+467
2023-05-05Disallow (min) specialization imps with no itemsMatthew Jasper-0/+2
Such implementations are usually mistakes and are not used in the compiler or standard library (after this commit) so forbid them with `min_specialization`.