Repository navigation
Conversation
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
…remapping, r=<try> Remap syntax contexts and expansion ids for det. metadata encoding
This comment has been minimized.
This comment has been minimized.
4195a79 to
46ee492
Compare
|
@bors try cancel |
|
Try build cancelled. Cancelled workflows: Hint: if you want to run another try build, you do not need to manually cancel the previous one. Just run |
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…remapping, r=<try> Remap syntax contexts and expansion ids for det. metadata encoding
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
💔 Test for 19b2816 failed: CI. Failed jobs:
|
07a0f64 to
43e622c
Compare
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…remapping, r=<try> Remap syntax contexts and expansion ids for det. metadata encoding
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (a7c6732): comparison URL. Overall result: ❌✅ regressions and improvements - please read:Benchmarking means the PR may be perf-sensitive. It's automatically marked not fit for rolling up. Overriding is possible but disadvised: it risks changing compiler perf. Next, please: If you can, justify the regressions found in this try perf run in writing along with @bors rollup=never rustc-perf Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary -2.9%, secondary -1.7%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary 11.8%, secondary 2.4%)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. Bootstrap: 490.152s -> 495.841s (1.16%) |
aff6a28 to
34a75c8
Compare
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…remapping, r=<try> Remap syntax contexts and expansion ids for det. metadata encoding
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (7bc5025): comparison URL. Overall result: ❌✅ regressions and improvements - please read:Benchmarking means the PR may be perf-sensitive. It's automatically marked not fit for rolling up. Overriding is possible but disadvised: it risks changing compiler perf. Next, please: If you can, justify the regressions found in this try perf run in writing along with @bors rollup=never rustc-perf Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary -1.1%, secondary -1.3%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary 2.3%, secondary -6.4%)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. Bootstrap: 489.693s -> 489.628s (-0.01%) |
34a75c8 to
0d8a6c0
Compare
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…remapping, r=<try> Remap syntax contexts and expansion ids for det. metadata encoding
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (37acb80): comparison URL. Overall result: ✅ improvements - no action neededBenchmarking means the PR may be perf-sensitive. It's automatically marked not fit for rolling up. Overriding is possible but disadvised: it risks changing compiler perf. @bors rollup=never rustc-perf Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary -0.6%, secondary -1.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary 0.8%)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. Bootstrap: 489.893s -> 490.336s (0.09%) |
| } | ||
| } | ||
|
|
||
| pub struct SyntaxContextRemapper<'a>(&'a mut HygieneData); |
There was a problem hiding this comment.
This is done for the following reasons:
- HygieneData is private and as I understood it should not be exposed outside of the crate
- There are a lot of common things in remapping of syntax contexts and local expansion ids, they differ only in small details like hash calculation, those common things are placed in default functions of
HygieneEntityRemappertrait - Those structs contain static functions to access remappers for syntax contexts and local expansion ids, as
HygieneDatais not accessible - Also we take the lock for the whole time of remapping calculation, so we do not acquire lock on every hash operation for example, it is ensured by
&'a mut HygieneData(it can be a problem if we do it in parallel, meaning calculation of syntax contexts and local expansion remapping), however that is the problem with design of access toHygieneDataas it always takes mutable lock, but after certain stage in compilation it should behave like aFreezeLock, as there should be only readonly accesses
I am not that sure about the design, so If you don't like it I can rework it somehow, but it seems to satisfy the conditions/thoughts above.
@rustbot ready
View all comments
#163495 which parallelizes AST -> HIR lowering breaks det. encoding of syntax contexts and expansions, however this PR with #162809 should fix the problem.
Now draft for perf and CI (dont look at the code). Remapping of those entities can cost us much, because unlike def ids there may be many expansions and contexts after we committed end of determinism.
r? @petrochenkov