Repository navigation
Declare SyntaxContext through rustc_index::newtype_index! - #164425
Conversation
|
Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt Some changes occurred in coverage instrumentation. cc @Zalathar |
This comment has been minimized.
This comment has been minimized.
ce1f806 to
6476b1a
Compare
This comment has been minimized.
This comment has been minimized.
|
Reminder, once the PR becomes ready for a review, use |
912364a to
5615b80
Compare
This comment has been minimized.
This comment has been minimized.
|
✌️ @aerooneqq, you can now approve this pull request! If @petrochenkov told you to " |
This comment has been minimized.
This comment has been minimized.
|
@bors r=petrochenkov squash msg="Declare |
This comment has been minimized.
This comment has been minimized.
|
🔨 14 commits were squashed into 63e2ea2. |
f41d0c4 to
63e2ea2
Compare
…uwer Rollup of 12 pull requests Successful merges: - #164458 (Avoid stdlib's `impl Hash for Path` for stable hashing) - #161790 (update to illumos sysroot 20210501) - #163087 (rmake: Add helpers for iterating symbols and objects) - #163586 (refactor Windows remove_dir_all) - #163983 (std: use `SOCK_NONBLOCK` in `connect_timeout`) - #164307 (Rename `PostTypeckUntilBorrowck` -> `PostTypeckThroughBorrowck`) - #164425 (Declare `SyntaxContext` through `rustc_index::newtype_index!`) - #156841 (Avoid cloning CFG-related analysis data.) - #164654 (Add reference annotations for unions) - #164717 (Allow `llm-assisted` label to be set without write access) - #164735 (Remove docs mentioning instability of wasm64) - #164737 (Update LLVM PassBuilder constructor calls to pass a context) Failed merges: - #164636 (Remove `record_*` macros from the metadata encoder)
…uwer Rollup of 12 pull requests Successful merges: - #164458 (Avoid stdlib's `impl Hash for Path` for stable hashing) - #161790 (update to illumos sysroot 20210501) - #163087 (rmake: Add helpers for iterating symbols and objects) - #163586 (refactor Windows remove_dir_all) - #163983 (std: use `SOCK_NONBLOCK` in `connect_timeout`) - #164307 (Rename `PostTypeckUntilBorrowck` -> `PostTypeckThroughBorrowck`) - #164425 (Declare `SyntaxContext` through `rustc_index::newtype_index!`) - #156841 (Avoid cloning CFG-related analysis data.) - #164654 (Add reference annotations for unions) - #164717 (Allow `llm-assisted` label to be set without write access) - #164735 (Remove docs mentioning instability of wasm64) - #164737 (Update LLVM PassBuilder constructor calls to pass a context) Failed merges: - #164636 (Remove `record_*` macros from the metadata encoder)
…uwer Rollup of 12 pull requests Successful merges: - #164458 (Avoid stdlib's `impl Hash for Path` for stable hashing) - #161790 (update to illumos sysroot 20210501) - #163087 (rmake: Add helpers for iterating symbols and objects) - #163586 (refactor Windows remove_dir_all) - #163983 (std: use `SOCK_NONBLOCK` in `connect_timeout`) - #164307 (Rename `PostTypeckUntilBorrowck` -> `PostTypeckThroughBorrowck`) - #164425 (Declare `SyntaxContext` through `rustc_index::newtype_index!`) - #156841 (Avoid cloning CFG-related analysis data.) - #164654 (Add reference annotations for unions) - #164717 (Allow `llm-assisted` label to be set without write access) - #164735 (Remove docs mentioning instability of wasm64) - #164737 (Update LLVM PassBuilder constructor calls to pass a context) Failed merges: - #164636 (Remove `record_*` macros from the metadata encoder)
Rollup merge of #164425 - aerooneqq:make-syntax-context-index, r=petrochenkov Declare `SyntaxContext` through `rustc_index::newtype_index!` `SyntaxContext` is basically an index type but it is not declared through `newtype_index`. r? @petrochenkov
|
Note This PR was benchmarked as part of triage of its containing rollup: triage URL. Finished benchmarking commit (58a325d): comparison URL. Overall result: ❌✅ regressions and improvements - please read:Our benchmarks found a performance regression caused by this PR. Next Steps:
@rustbot label: +perf-regression Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (secondary -5.8%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary -15.5%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis perf run didn't have relevant results for this metric. Artifact size: 406.54 MiB -> 406.53 MiB (-0.00%) |
|
Interesting, that seems somewhat unexpected. Do we know where the improvements come from? Is this maybe because we get better niches? |
|
I did not expect it to affect perf at all, have no idea where those changes came from. |
|
The main diff for -4,076,687 (100.0%) PROGRAM TOTALS
Ir________________________ function:file
> -2,912,933 (71.5%, 71.5%) malloc_default:???
> -678,752 (16.6%, 88.1%) <rustc_parse::parser::Parser>::parse_token_tree:???
> -452,880 (11.1%, 99.2%) pthread_mutex_trylock@@GLIBC_2.34:./nptl/./nptl/pthread_mutex_trylock.c
> -318,240 (7.8%, 107.0%) pthread_mutex_unlock@@GLIBC_2.2.5:./nptl/./nptl/pthread_mutex_unlock.c
> -313,196 (7.7%, 114.7%) tcache_bin_flush_stashed:???
> 292,428 (-7.2%, 107.5%) <rustc_middle::query::on_disk_cache::CacheEncoder as rustc_span::SpanEncoder>::encode_span:???
> 180,227 (-4.4%, 103.1%) <rustc_hir::hir::Ty as rustc_data_structures::stable_hash::StableHash>::stable_hash::<rustc_middle::ich::StableHashState>:???
> -149,263 (3.7%, 106.8%) <rustc_parse::parser::Parser>::bump:???
> -120,038 (2.9%, 109.7%) <rustc_attr_parsing::interface::AttributeParser>::parse_single::<rustc_ast::attr::data_structures::CfgEntry>:???
> 107,469 (-2.6%, 107.1%) <rustc_resolve::Resolver>::resolve_crate::{closure#0}:???For Ir__________________
-18,106,714 (100.0%) PROGRAM TOTALS
--------------------------------------------------------------------------------
-- File:function summary
--------------------------------------------------------------------------------
Ir_________________________ file:function
< -12,559,136 (69.4%, 69.4%) ???:
-7,093,547 (39.2%) <rustc_parse::parser::Parser>::parse_token_tree
-4,727,670 (26.1%) <rustc_expand::expand::MacroExpander>::fully_expand_fragment
-593,265 (3.3%) <rustc_mir_transform::pass_manager::Lint<rustc_mir_transform::check_packed_ref::CheckPackedRef> as rustc_mir_transform::pass_manager::MirPass>::run_pass
593,256 (-3.3%) <rustc_mir_transform::check_packed_ref::CheckPackedRef as rustc_mir_transform::pass_manager::MirLint>::run_lint
386,483 (-2.1%) <rustc_lint::BuiltinCombinedLateLintModPass as rustc_lint::passes::LateLintPass>::check_stmt
-363,508 (2.0%) <rustc_lint::unused::must_use::UnusedResults as rustc_lint::passes::LateLintPass>::check_stmt
-354,985 (2.0%) malloc_default
-212,568 (1.2%) <alloc::raw_vec::RawVec<rustc_expand::mbe::macro_parser::MatcherPos>>::grow_one
206,316 (-1.1%) <alloc::raw_vec::RawVec<rustc_mir_transform::jump_threading::EdgeEffect>>::grow_one
135,644 (-0.7%) <rustc_span::hygiene::ExpnData>::hash_expn::<rustc_middle::ich::StableHashState>
-98,338 (0.5%) reallocDoes macro expansion use something like |
Why is normal malloc showing up, rather than jemalloc? @Kobzol, any ideas? |
|
I don't think that's the default malloc from libc, if I understand correctly, jemalloc contains |
|
oh, |
|
I tried to remove the niche in #164803, and that shows no changes, so this is probably something else. |
…ochenkov Add `#[default]` for `newtype_index!` Add `#[default]` for `newtype_index!`. We can merge it before or after rust-lang/rust#164425. r? @petrochenkov
View all comments
SyntaxContextis basically an index type but it is not declared throughnewtype_index.r? @petrochenkov