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 8 pull requests #82550

Closed
wants to merge 19 commits into from

Commits on Feb 10, 2021

  1. Stabilize str_split_once

    jhpratt committed Feb 10, 2021
    Configuration menu
    Copy the full SHA
    c28f2a8 View commit details
    Browse the repository at this point in the history

Commits on Feb 23, 2021

  1. Make ItemKind::ExternCrate looks like hir::ItemKind::ExternCrate to m…

    …ake transition over hir::ItemKind simpler
    GuillaumeGomez committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    4c70372 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5ff1be1 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c75c4a5 View commit details
    Browse the repository at this point in the history

Commits on Feb 24, 2021

  1. Consider inexpensive inlining criteria first

    Refactor inlining decisions so that inexpensive criteria are considered first:
    
    1. Based on code generation attributes.
    2. Based on MIR availability (examines call graph).
    3. Based on MIR body.
    tmiasko committed Feb 24, 2021
    Configuration menu
    Copy the full SHA
    6d5c0c1 View commit details
    Browse the repository at this point in the history

Commits on Feb 25, 2021

  1. fix review

    klensy committed Feb 25, 2021
    Configuration menu
    Copy the full SHA
    08b1e80 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    fb24a10 View commit details
    Browse the repository at this point in the history
  3. Set codegen thread names

    For example, gdb:
    
    ```
    (gdb) info threads
      Id   Target Id                                          Frame
      1    Thread 0x7fffefa7ec40 (LWP 2905) "rustc"           __pthread_clockjoin_ex (threadid=140737214134016, thread_return=0x0, clockid=<optimized out>, abstime=<optimized out>, block=<optimized out>)
        at pthread_join_common.c:145
      2    Thread 0x7fffefa7b700 (LWP 2957) "rustc"           0x00007ffff125eaa8 in llvm::X86_MC::initLLVMToSEHAndCVRegMapping(llvm::MCRegisterInfo*) ()
       from /home/wesley/.rustup/toolchains/stage1/lib/librustc_driver-f866439e29074957.so
      3    Thread 0x7fffeef0f700 (LWP 3116) "rustc"           futex_wait_cancelable (private=0, expected=0, futex_word=0x7fffe8602ac8) at ../sysdeps/nptl/futex-internal.h:183
    * 4    Thread 0x7fffeed0e700 (LWP 3123) "rustc"           rustc_codegen_ssa::back::write::spawn_work (cgcx=..., work=...) at /home/wesley/code/rust/rust/compiler/rustc_codegen_ssa/src/back/write.rs:1573
      6    Thread 0x7fffe113b700 (LWP 3150) "opt foof.7rcbfp" 0x00007ffff2940e62 in llvm::CallGraph::populateCallGraphNode(llvm::CallGraphNode*) ()
       from /home/wesley/.rustup/toolchains/stage1/lib/librustc_driver-f866439e29074957.so
      8    Thread 0x7fffe0d39700 (LWP 3158) "opt foof.7rcbfp" 0x00007fffefe8998e in malloc_consolidate (av=av@entry=0x7ffe2c000020) at malloc.c:4492
      9    Thread 0x7fffe0f3a700 (LWP 3162) "opt foof.7rcbfp" 0x00007fffefef27c4 in __libc_open64 (file=0x7fffe0f38608 "foof.foof.7rcbfp3g-cgu.6.rcgu.o", oflag=524865) at ../sysdeps/unix/sysv/linux/open64.c:48
    (gdb)
    ```
    wesleywiser committed Feb 25, 2021
    Configuration menu
    Copy the full SHA
    9d3739d View commit details
    Browse the repository at this point in the history

Commits on Feb 26, 2021

  1. Add optional woff2 versions of FiraSans.

    For browsers that support woff2 (most modern ones:
    https://caniuse.com/woff2), this offers a reduction in download size
    for these two fonts from 362k to 257k (32% reduction). It decreases the
    total page size for `struct.String.html` (counting all subresources) by
    about 2.5%.
    
    If this is interesting, I'm happy to apply the same treatment to the
    other fonts, but these two are the biggest.
    jsha committed Feb 26, 2021
    Configuration menu
    Copy the full SHA
    c47903f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ad7ed13 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b0dc39e View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#80845 - GuillaumeGomez:item-kind-transition…

    …, r=jyn514
    
    Make ItemKind::ExternCrate looks like hir::ItemKind::ExternCrate to make transition over hir::ItemKind simpler
    
    It was surprisingly difficult to make this change, mostly because of two issues:
    
    * We now store the `ExternCrate` name in the parent struct (`clean::Item`), which forced me to modify the json conversion code a bit more than expected.
    * The second problem was that, since we now have a `Some(name)`, it was trying to render it, ending up in a panic because we ended up in a `unreachable` statement. The solution was simply to add `!item.is_extern_crate()` in `formats::renderer` before calling `cx.item(item, &cache)?;`.
    
    I'll continue to replace all the `clean::ItemKind` variants one by one until it looks exactly like `hir::ItemKind`. Then we'll simply discard the rustdoc type. Once this done, we'll be able to discard `clean::Item` too to use `hir::Item`.
    
    r? ``@jyn514``
    GuillaumeGomez authored Feb 26, 2021
    Configuration menu
    Copy the full SHA
    36aa36b View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#81940 - jhpratt:stabilize-str_split_once, r…

    …=m-ou-se
    
    Stabilize str_split_once
    
    Closes rust-lang#74773
    GuillaumeGomez authored Feb 26, 2021
    Configuration menu
    Copy the full SHA
    99d4d41 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#82456 - klensy:or-else, r=estebank

    Replaced some unwrap_or and map_or with lazy variants
    
    Replaced some `unwrap_or` and `map_or` with `unwrap_or_else` and `map_or_else`.
    GuillaumeGomez authored Feb 26, 2021
    Configuration menu
    Copy the full SHA
    72aa8b1 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#82491 - tmiasko:i, r=lcnr

    Consider inexpensive inlining criteria first
    
    Refactor inlining decisions so that inexpensive criteria are considered first:
    
    1. Based on code generation attributes.
    2. Based on MIR availability (examines call graph).
    3. Based on MIR body.
    GuillaumeGomez authored Feb 26, 2021
    Configuration menu
    Copy the full SHA
    dd9ef93 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#82506 - estebank:unused_variable_lint, r=lcnr

    Properly account for non-shorthand pattern field in unused variable lint
    
    Fix rust-lang#82488
    GuillaumeGomez authored Feb 26, 2021
    Configuration menu
    Copy the full SHA
    c21341b View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#82535 - wesleywiser:wip_codegen_thread_name…

    …s, r=nagisa
    
    Set codegen thread names
    
    Set names on threads spawned during codegen. Various debugging and profiling tools can take advantage of this to show a more useful identifier for threads.
    
    For example, gdb will show thread names in `info threads`:
    
    ```
    (gdb) info threads
      Id   Target Id                                          Frame
      1    Thread 0x7fffefa7ec40 (LWP 2905) "rustc"           __pthread_clockjoin_ex (threadid=140737214134016, thread_return=0x0, clockid=<optimized out>, abstime=<optimized out>, block=<optimized out>)
        at pthread_join_common.c:145
      2    Thread 0x7fffefa7b700 (LWP 2957) "rustc"           0x00007ffff125eaa8 in llvm::X86_MC::initLLVMToSEHAndCVRegMapping(llvm::MCRegisterInfo*) ()
       from /home/wesley/.rustup/toolchains/stage1/lib/librustc_driver-f866439e29074957.so
      3    Thread 0x7fffeef0f700 (LWP 3116) "rustc"           futex_wait_cancelable (private=0, expected=0, futex_word=0x7fffe8602ac8) at ../sysdeps/nptl/futex-internal.h:183
    * 4    Thread 0x7fffeed0e700 (LWP 3123) "rustc"           rustc_codegen_ssa::back::write::spawn_work (cgcx=..., work=...) at /home/wesley/code/rust/rust/compiler/rustc_codegen_ssa/src/back/write.rs:1573
      6    Thread 0x7fffe113b700 (LWP 3150) "opt foof.7rcbfp" 0x00007ffff2940e62 in llvm::CallGraph::populateCallGraphNode(llvm::CallGraphNode*) ()
       from /home/wesley/.rustup/toolchains/stage1/lib/librustc_driver-f866439e29074957.so
      8    Thread 0x7fffe0d39700 (LWP 3158) "opt foof.7rcbfp" 0x00007fffefe8998e in malloc_consolidate (av=av@entry=0x7ffe2c000020) at malloc.c:4492
      9    Thread 0x7fffe0f3a700 (LWP 3162) "opt foof.7rcbfp" 0x00007fffefef27c4 in __libc_open64 (file=0x7fffe0f38608 "foof.foof.7rcbfp3g-cgu.6.rcgu.o", oflag=524865) at ../sysdeps/unix/sysv/linux/open64.c:48
    (gdb)
    ```
    
    and Windows Performance Analyzer will also show this information when profiling:
    
    ![image](https://user-images.githubusercontent.com/831192/109231017-d311f780-7793-11eb-8072-ab836a830e90.png)
    GuillaumeGomez authored Feb 26, 2021
    Configuration menu
    Copy the full SHA
    0d7f5a0 View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#82545 - jsha:woff2, r=GuillaumeGomez

    rustdoc: add optional woff2 versions of FiraSans.
    
    For browsers that support woff2 (most modern ones:
    https://caniuse.com/woff2), this offers a reduction in download size
    for these two fonts from 362k to 257k (32% reduction). It decreases the
    total page size for `struct.String.html` (counting all subresources) by
    about 2.5%.
    
    If this is interesting, I'm happy to apply the same treatment to the
    other fonts, but these two are the biggest.
    GuillaumeGomez authored Feb 26, 2021
    Configuration menu
    Copy the full SHA
    97efb53 View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#82549 - rust-lang:revert-82313-update-norma…

    …lize-css, r=apiraino
    
    Revert "Update normalize.css to 8.0.1"
    
    Reverts rust-lang#82313
    
    Fixes rust-lang#82548
    Fixes rust-lang#82542
    
    `@jsha:` I'm reverting until we can come up with a new version which is fully working.
    
    r? `@jyn514`
    GuillaumeGomez authored Feb 26, 2021
    Configuration menu
    Copy the full SHA
    4afd98c View commit details
    Browse the repository at this point in the history