Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 16 pull requests #55943

Closed
wants to merge 49 commits into from
Closed

Rollup of 16 pull requests #55943

wants to merge 49 commits into from

Conversation

kennytm
Copy link
Member

@kennytm kennytm commented Nov 14, 2018

Successful merges:

qnighy and others added 30 commits October 8, 2018 21:39
This is no longer handled on the kernel side
### Before

```
# Run 1
test char::methods::bench_to_digit_radix_10                ... bench:      16,265 ns/iter (+/- 1,774)
test char::methods::bench_to_digit_radix_16                ... bench:      13,938 ns/iter (+/- 2,479)
test char::methods::bench_to_digit_radix_2                 ... bench:      13,090 ns/iter (+/- 524)
test char::methods::bench_to_digit_radix_36                ... bench:      14,236 ns/iter (+/- 1,949)

# Run 2
test char::methods::bench_to_digit_radix_10                ... bench:      16,176 ns/iter (+/- 1,589)
test char::methods::bench_to_digit_radix_16                ... bench:      13,896 ns/iter (+/- 3,140)
test char::methods::bench_to_digit_radix_2                 ... bench:      13,158 ns/iter (+/- 1,112)
test char::methods::bench_to_digit_radix_36                ... bench:      14,206 ns/iter (+/- 1,312)

# Run 3
test char::methods::bench_to_digit_radix_10                ... bench:      16,221 ns/iter (+/- 2,423)
test char::methods::bench_to_digit_radix_16                ... bench:      14,361 ns/iter (+/- 3,926)
test char::methods::bench_to_digit_radix_2                 ... bench:      13,097 ns/iter (+/- 671)
test char::methods::bench_to_digit_radix_36                ... bench:      14,388 ns/iter (+/- 1,068)
```

### After

```
# Run 1
test char::methods::bench_to_digit_radix_10      ... bench:      11,521 ns/iter (+/- 552)
test char::methods::bench_to_digit_radix_16      ... bench:      12,926 ns/iter (+/- 684)
test char::methods::bench_to_digit_radix_2       ... bench:      11,266 ns/iter (+/- 1,085)
test char::methods::bench_to_digit_radix_36      ... bench:      14,213 ns/iter (+/- 614)

# Run 2
test char::methods::bench_to_digit_radix_10      ... bench:      11,424 ns/iter (+/- 1,042)
test char::methods::bench_to_digit_radix_16      ... bench:      12,854 ns/iter (+/- 1,193)
test char::methods::bench_to_digit_radix_2       ... bench:      11,193 ns/iter (+/- 716)
test char::methods::bench_to_digit_radix_36      ... bench:      14,249 ns/iter (+/- 3,514)

# Run 3
test char::methods::bench_to_digit_radix_10      ... bench:      11,469 ns/iter (+/- 685)
test char::methods::bench_to_digit_radix_16      ... bench:      12,852 ns/iter (+/- 568)
test char::methods::bench_to_digit_radix_2       ... bench:      11,275 ns/iter (+/- 1,356)
test char::methods::bench_to_digit_radix_36      ... bench:      14,188 ns/iter (+/- 1,501)
```
This was [recommended by AppVeyor][1] to see if it has any impact on our
build times, hopefully on the beneficial side of things! This shouldn't
affect our binary compatibility for generated compilers like it would
normally do for Linux.

[1]: https://help.appveyor.com/discussions/questions/29832-did-recent-changes-apply-to-possibly-slow-down-builds#comment_46484879
Because those files are quite large, contribute significantly to peak
memory usage, but only a small fraction of the data is ever read.
…frewsxcv

Add link to std::mem::size_of to size_of intrinsic documentation

The other intrinsics with safe/stable alternatives already have documentation to this effect.
@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Nov 14, 2018
A few tweaks to iterations/collecting

- simplify and speed up `dot::GraphWalk::nodes` for `cfg::CFG`
- `reserve` the capacity for `edges` in `DepGraph::query`
- collect directly to a `HirVec` in `LoweringContext::lower_attrs`
- fix overallocation in `OnDiskCache::serialize`
- preallocate the `new_partitioning` vector in `merge_codegen_units`
- simplify `impl FromHex for str`
- improve the creation of `self_arg_names` in `impl MethodDef`
…illaumeGomez

Change sidebar selector to fix compatibility with docs.rs

Fix for rust-lang#55883.
A handful of hir tweaks

- remove an unused `hir_vec` macro pattern
- simplify `fmt::Debug` for `hir::Path` (take advantage of the `Display` implementation)
- remove an unused type alias (`CrateConfig`)
- simplify a `match` expression (join common patterns)
save-analysis: be even more aggressive about ignorning macro-generated defs

r? @eddyb
appveyor: Use VS2017 for all our images

This was [recommended by AppVeyor][1] to see if it has any impact on our
build times, hopefully on the beneficial side of things! This shouldn't
affect our binary compatibility for generated compilers like it would
normally do for Linux.

[1]: https://help.appveyor.com/discussions/questions/29832-did-recent-changes-apply-to-possibly-slow-down-builds#comment_46484879
Use `Mmap` to open the rmeta file.

Because those files are quite large, contribute significantly to peak
memory usage, but only a small fraction of the data is ever read.
submodules: update clippy from d8b4269 to 7e0ddef

Just a routine update, can be rolled up.

Changes:
````
Fix "too" -> "foo" typo in format.rs
Fix `use_self` violation
Fix wrong suggestion for `redundant_closure_call`
Fix `use_self` false positive on `use` statements
Fix `use_self` false positive
Remove `+` from `has_unary_equivalent`
Fix dogfood
Update println! formatting
Fix false positive in check mode caused by `gen_deprecated`
RIIR update lints: Add check mode (update_lints.py rewrite complete)
changed into_iter to iter and fixed a lint check
Fix `collapsible_if` error
Fix `possible_missing_comma` false positives
format code
fix comment spacing
change single char str to char
add lint to lintarray macro
Revert "small fix"
small fix
added float support for mistyped literal lints
tmp progress
````
Redox: Update to new changes

These are all cherry-picked from our fork:

 - Remove the `env:` scheme
 - Update `execve` system call to `fexec`
 - Interpret shebangs: these are no longer handled by the kernel, which like usual tries to be as minimal as possible
NetBSD: link libstd with librt in addition to libpthread

Some aio(3) and mq(3) functions in the libc crate actually come from NetBSD librt, not libc or libpthread.
Reattach all grandchildren when constructing specialization graph.

Specialization graphs are constructed by incrementally adding impls in the order of declaration. If the impl being added has its specializations in the graph already, they should be reattached under the impl. However, the current implementation only reattaches the one found first. Therefore, in the following specialization graph,

```
  Tr1
   |
   I3
  /  \
 I1  I2
```

If `I1`, `I2`, and `I3` are declared in this order, the compiler mistakenly constructs the following graph:

```
  Tr1
  /  \
 I3  I2
  |
 I1
```

This patch fixes the reattach procedure to include all specializing grandchildren-to-be.

Fixes rust-lang#50452.
core/char: Speed up `to_digit()` for `radix <= 10`

I noticed that `char::to_digit()` seemed to do a bit of extra work for handling `[a-zA-Z]` characters. Since `to_digit(10)` seems to be the most common case (at least in the `rust` codebase) I thought it might be valuable to create a fast path for that case, and according to the benchmarks that I added in one of the commits it seems to pay off. I also created another fast path for the `radix < 10` case, which also seems to have a positive effect.

It is very well possible that I'm measuring something entirely unrelated though, so please verify these numbers and let me know if I missed something!

### Before

```
# Run 1
test char::methods::bench_to_digit_radix_10      ... bench:      16,265 ns/iter (+/- 1,774)
test char::methods::bench_to_digit_radix_16      ... bench:      13,938 ns/iter (+/- 2,479)
test char::methods::bench_to_digit_radix_2       ... bench:      13,090 ns/iter (+/- 524)
test char::methods::bench_to_digit_radix_36      ... bench:      14,236 ns/iter (+/- 1,949)

# Run 2
test char::methods::bench_to_digit_radix_10      ... bench:      16,176 ns/iter (+/- 1,589)
test char::methods::bench_to_digit_radix_16      ... bench:      13,896 ns/iter (+/- 3,140)
test char::methods::bench_to_digit_radix_2       ... bench:      13,158 ns/iter (+/- 1,112)
test char::methods::bench_to_digit_radix_36      ... bench:      14,206 ns/iter (+/- 1,312)

# Run 3
test char::methods::bench_to_digit_radix_10      ... bench:      16,221 ns/iter (+/- 2,423)
test char::methods::bench_to_digit_radix_16      ... bench:      14,361 ns/iter (+/- 3,926)
test char::methods::bench_to_digit_radix_2       ... bench:      13,097 ns/iter (+/- 671)
test char::methods::bench_to_digit_radix_36      ... bench:      14,388 ns/iter (+/- 1,068)
```

### After

```
# Run 1
test char::methods::bench_to_digit_radix_10      ... bench:      11,521 ns/iter (+/- 552)
test char::methods::bench_to_digit_radix_16      ... bench:      12,926 ns/iter (+/- 684)
test char::methods::bench_to_digit_radix_2       ... bench:      11,266 ns/iter (+/- 1,085)
test char::methods::bench_to_digit_radix_36      ... bench:      14,213 ns/iter (+/- 614)

# Run 2
test char::methods::bench_to_digit_radix_10      ... bench:      11,424 ns/iter (+/- 1,042)
test char::methods::bench_to_digit_radix_16      ... bench:      12,854 ns/iter (+/- 1,193)
test char::methods::bench_to_digit_radix_2       ... bench:      11,193 ns/iter (+/- 716)
test char::methods::bench_to_digit_radix_36      ... bench:      14,249 ns/iter (+/- 3,514)

# Run 3
test char::methods::bench_to_digit_radix_10      ... bench:      11,469 ns/iter (+/- 685)
test char::methods::bench_to_digit_radix_16      ... bench:      12,852 ns/iter (+/- 568)
test char::methods::bench_to_digit_radix_2       ... bench:      11,275 ns/iter (+/- 1,356)
test char::methods::bench_to_digit_radix_36      ... bench:      14,188 ns/iter (+/- 1,501)
```

I ran the benchmark using:

```sh
python x.py bench src/libcore --stage 1 --keep-stage 0 --test-args "bench_to_digit"
```
add tests for some fixed ICEs

Fixes rust-lang#55587.
Fixes rust-lang#54348.

Looks like these ICEs are already fixed in nightly, so this PR just adds tests.
@kennytm kennytm changed the title Rollup of 15 pull requests Rollup of 16 pull requests Nov 15, 2018
@kennytm
Copy link
Member Author

kennytm commented Nov 15, 2018

@bors r+

Removed #55767 (causing error above)
Removed #55947 (already merged)
Added #54906, #55932, #55956.

@bors
Copy link
Contributor

bors commented Nov 15, 2018

📌 Commit cdfa41e has been approved by kennytm

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 15, 2018
@bors
Copy link
Contributor

bors commented Nov 15, 2018

⌛ Testing commit cdfa41e with merge f07ed2a...

bors added a commit that referenced this pull request Nov 15, 2018
Rollup of 16 pull requests

Successful merges:

 - #54906 (Reattach all grandchildren when constructing specialization graph.)
 - #55182 (Redox: Update to new changes)
 - #55211 (Add BufWriter::buffer method)
 - #55507 (Add link to std::mem::size_of to size_of intrinsic documentation)
 - #55530 (Speed up String::from_utf16)
 - #55556 (Use `Mmap` to open the rmeta file.)
 - #55622 (NetBSD: link libstd with librt in addition to libpthread)
 - #55827 (A few tweaks to iterations/collecting)
 - #55901 (fix various typos in doc comments)
 - #55926 (Change sidebar selector to fix compatibility with docs.rs)
 - #55930 (A handful of hir tweaks)
 - #55932 (core/char: Speed up `to_digit()` for `radix <= 10`)
 - #55935 (appveyor: Use VS2017 for all our images)
 - #55936 (save-analysis: be even more aggressive about ignorning macro-generated defs)
 - #55948 (submodules: update clippy from d8b4269 to 7e0ddef)
 - #55956 (add tests for some fixed ICEs)
@bors
Copy link
Contributor

bors commented Nov 15, 2018

💔 Test failed - status-appveyor

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Nov 15, 2018
@kennytm kennytm closed this Nov 15, 2018
@Centril Centril added the rollup A PR which is a rollup label Oct 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet