summary refs log tree commit diff
path: root/compiler/rustc_index/src
AgeCommit message (Collapse)AuthorLines
2021-12-30Introduce IntervalSetMark Rousskov-0/+469
This is a compact, fast storage for variable-sized sets, typically consisting of larger ranges. It is less efficient than a bitset if ranges are both small and the domain size is small, but will still perform acceptably. With enormous domain sizes and large ranges, the interval set performs much better, as it can be much more densely packed in memory than the uncompressed bit set alternative.
2021-12-22Require Ord for rustc_index::SparseBitSet::last_set_inpierwill-3/+8
2021-12-22Remove `PartialOrd` and `Ord` from `LocalDefId`pierwill-2/+2
Implement `Ord`, `PartialOrd` for SpanData
2021-12-18Derive hash for BitSet and BitMatrixTomasz Miąsko-2/+2
2021-12-14Stabilize iter::zip.PFPoitras-1/+0
2021-11-24Auto merge of #90491 - Mark-Simulacrum:push-pred-faster, r=matthewjasperbors-1/+238
Optimize live point computation This refactors the live-point computation to lower per-MIR-instruction costs by operating on a largely per-block level. This doesn't fundamentally change the number of operations necessary, but it greatly improves the practical performance by aggregating bit manipulation into ranges rather than single-bit; this scales much better with larger blocks. On the benchmark provided in #90445, with 100,000 array elements, walltime for a check build is improved from 143 seconds to 15. I consider the tiny losses here acceptable given the many small wins on real world benchmarks and large wins on stress tests. The new code scales much better, but on some subset of inputs the slightly higher constant overheads decrease performance somewhat. Overall though, this is expected to be a big win for pathological cases (as illustrated by the test case motivating this work) and largely not material for non-pathological cases. I consider the new code somewhat easier to follow, too.
2021-11-13Generate documentation in rustc `rustc_index::newtype_index` macropierwill-1/+23
The macro now documents all generated items. Documentation notes possible panics and unsafety.
2021-11-03Optimize live point computationMark Rousskov-1/+238
This is just replicating the previous algorithm, but taking advantage of the bitset structures to optimize into tighter and better optimized loops. Particularly advantageous on enormous MIR blocks, which are relatively rare in practice.
2021-10-23update cfg(bootstrap)Pietro Albini-6/+0
2021-10-15Revert "Auto merge of #89709 - clemenswasser:apply_clippy_suggestions_2, ↵Matthias Krüger-7/+11
r=petrochenkov" The PR had some unforseen perf regressions that are not as easy to find. Revert the PR for now. This reverts commit 6ae8912a3e7d2c4c775024f58a7ba4b1aedc4073, reversing changes made to 86d6d2b7389fe1b339402c1798edae8b695fc9ef.
2021-10-12Use Option::map_or instead of open coding itLingMan-1/+1
2021-10-11Rollup merge of #89643 - cjgillot:overlap, r=matthewjasperMatthias Krüger-0/+6
Fix inherent impl overlap check. The current implementation of the overlap check was slightly buggy, and unified the wrong connected component in the `ids.len() <= 1` case. This became visible in another PR which changed the iteration order of items. r? ``@matthewjasper`` since you reviewed the other PR.
2021-10-11Remove unnecessary variableClemens Wasser-2/+1
2021-10-10Apply clippy suggestionsClemens Wasser-10/+7
2021-10-07Fix inherent impl overlap check.Camille GILLOT-0/+6
2021-10-04Rollup merge of #89508 - jhpratt:stabilize-const_panic, r=joshtriplettJubilee-2/+6
Stabilize `const_panic` Closes #51999 FCP completed in #89006 ```@rustbot``` label +A-const-eval +A-const-fn +T-lang cc ```@oli-obk``` for review (not `r?`'ing as not on lang team)
2021-10-04Stabilize `const_panic`Jacob Pratt-2/+6
2021-10-03Replace Fn impls with RPIT impls in rustc_indexbjorn3-45/+17
This is cleaner and removes an unstable feature usage
2021-10-02Swap out unboxed_closures feature gate for min_specializationbjorn3-1/+1
For some reason unboxed_closures supresses the feature gate for min_specialization when implementing TrustedStep. min_specialization is the true feature that is used.
2021-09-22rustc_index: Add some map-like APIs to `IndexVec`Vadim Petrochenkov-6/+17
2021-08-27Suggested changesWill Crichton-2/+2
2021-08-27Addd missing domain size assertionsWill Crichton-1/+3
2021-08-26FormattingWill Crichton-6/+6
2021-08-26Fix failing testWill Crichton-7/+7
2021-08-26Add comments and unit tests for new SparseBitMatrix methodsWill Crichton-0/+85
2021-08-26Compile failureWill Crichton-1/+1
2021-08-26TypoWill Crichton-2/+2
2021-08-26Add remaining impl for hybrid X denseWill Crichton-21/+51
2021-08-26Compilation failure in testsWill Crichton-6/+6
2021-08-26FormattingWill Crichton-2/+2
2021-08-26Add commentsWill Crichton-0/+12
2021-08-26Fix sparse intersect bug, add more sparse / dense testsWill Crichton-2/+13
2021-08-25Add unit tests for BitSet intersect/subtractWill Crichton-1/+12
2021-08-25Small fixesWill Crichton-3/+6
2021-08-25Add optimized sparse-hybrid / dense-hybrid intersectWill Crichton-6/+21
2021-08-25Remove BitRelations impls for SparseBitSet, add optimizationsWill Crichton-63/+29
2021-08-24Fix HybridBitSet port issueWill Crichton-3/+16
2021-08-24Refactor BitSet relational methods into trait with parameterizedWill Crichton-122/+231
right-hand side
2021-08-23Make SparseBitMatrix::ensure_row public to enable general mutation of rowsWill Crichton-1/+1
2021-05-31Remove unused feature gatesbjorn3-1/+0
2021-05-31Use allow_internal_unstable more in rustc_indexbjorn3-2/+1
2021-05-26Unify feature flags as `step_trait`Jacob Pratt-1/+1
While stdlib implementations of the unchecked methods require unchecked math, there is no reason to gate it behind this for external users. The reasoning for a separate `step_trait_ext` feature is unclear, and as such has been merged as well.
2021-05-26Specialize implementationsJacob Pratt-0/+4
Implementations in stdlib are now optimized as they were before.
2021-05-26Make Range implementation safeJacob Pratt-1/+1
2021-05-04Change bitwise operator to more easily keep data in vector registersMark Rousskov-3/+7
2021-04-25fix sanitizer testsRalf Jung-1/+0
2021-04-25move core::hint::black_box under its own feature gateRalf Jung-0/+2
2021-04-24Auto merge of #84310 - RalfJung:const-fn-feature-flags, r=oli-obkbors-1/+0
further split up const_fn feature flag This continues the work on splitting up `const_fn` into separate feature flags: * `const_fn_trait_bound` for `const fn` with trait bounds * `const_fn_unsize` for unsizing coercions in `const fn` (looks like only `dyn` unsizing is still guarded here) I don't know if there are even any things left that `const_fn` guards... at least libcore and liballoc do not need it any more. `@oli-obk` are you currently able to do reviews?
2021-04-21Use arrayvec 0.7, drop smallvec 0.6Jubilee Young-1/+1
With the arrival of min const generics, many alt-vec libraries have updated to use it in some way and arrayvec is no exception. Use the latest with minor refactoring. Also, rustc_workspace_hack is the only user of smallvec 0.6 in the entire tree, so drop it.
2021-04-18fix feature use in rustc libsRalf Jung-1/+0