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 4 pull requests #91253

Merged
merged 10 commits into from
Nov 26, 2021
Merged

Rollup of 4 pull requests #91253

merged 10 commits into from
Nov 26, 2021

Commits on Nov 24, 2021

  1. Configuration menu
    Copy the full SHA
    870b831 View commit details
    Browse the repository at this point in the history
  2. If the thread does not get the lock in the short term, yield the CPU

    Reduces the amount of wasted processor cycles
    stlankes committed Nov 24, 2021
    Configuration menu
    Copy the full SHA
    644b445 View commit details
    Browse the repository at this point in the history
  3. Improving the readability

    Co-authored-by: kennytm <kennytm@gmail.com>
    stlankes and kennytm authored Nov 24, 2021
    Configuration menu
    Copy the full SHA
    6911af9 View commit details
    Browse the repository at this point in the history

Commits on Nov 25, 2021

  1. Configuration menu
    Copy the full SHA
    c981d40 View commit details
    Browse the repository at this point in the history
  2. Fix issue 91206

    compiler-errors committed Nov 25, 2021
    Configuration menu
    Copy the full SHA
    718a3b1 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    69d1917 View commit details
    Browse the repository at this point in the history

Commits on Nov 26, 2021

  1. Rollup merge of rust-lang#91169 - RDambrosio016:master, r=bjorn3

    Change cg_ssa's get_param to borrow the builder mutably
    
    This is a small change to make `get_param` more flexible for codegens that may need to modify things when retrieving function parameters.
    
    This will currently only be used by [rustc_codegen_nvvm](https://github.com/Rust-GPU/Rust-CUDA) (my own project), but may be useful to more codegens in the future.
    
    This is needed because cg_nvvm needs to remap certain types to libnvvm-friendly types, such as `i128` -> `<2 x i64>`. Because cg_ssa does not give mutable access to the builder, i resorted to using a mutex:
    ```rs
        fn get_param(&self, index: usize) -> Self::Value {
            let val = llvm::get_param(self.llfn(), index as c_uint);
            trace!("Get param `{:?}`", val);
            unsafe {
                let llfnty = LLVMRustGetFunctionType(self.llfn());
                let map = self.remapped_integer_args.borrow();
                if let Some((_, key)) = map.get(llfnty) {
                    if let Some((_, new_ty)) = key.iter().find(|t| t.0 == index) {
                        trace!("Casting irregular param {:?} to {:?}", val, new_ty);
                        return transmute_llval(
                            *self.llbuilder.lock().unwrap(),
                            &self.cx,
                            val,
                            *new_ty,
                        );
                    }
                }
                val
            }
        }
    ```
    However, i predict this is pretty bad for performance, considering how much builders are called during codegen, so i would greatly appreciate having a more flexible API for this.
    matthiaskrgr authored Nov 26, 2021
    Configuration menu
    Copy the full SHA
    324b4bc View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#91176 - hermitcore:spin, r=kennytm

    If the thread does not get the lock in the short term, yield the CPU
    
    Reduces on [RustyHermit](https://github.com/hermitcore/rusty-hermit) the amount of wasted processor cycles
    matthiaskrgr authored Nov 26, 2021
    Configuration menu
    Copy the full SHA
    fdc305d View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#91212 - compiler-errors:issue91206, r=oli-obk

    Fix ICE due to out-of-bounds statement index when reporting borrowck error
    
    Replace an `[index]` with a `.get` when `statement_index` points to a basic-block terminator (and is therefore out-of-bounds in the statements list).
    
    Fixes rust-lang#91206
    Cc ``@camsteffen``
    r? ``@oli-obk``
    matthiaskrgr authored Nov 26, 2021
    Configuration menu
    Copy the full SHA
    13c6066 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#91225 - GuillaumeGomez:source-page-scrollba…

    …r, r=jsha
    
    Fix invalid scrollbar display on source code page
    
    Fixes bug introduced in rust-lang#90983:
    
    ![Screenshot from 2021-11-25 17-01-08](https://user-images.githubusercontent.com/3050060/143473753-c2e7c43c-ce3f-474d-9d2a-922e63189c51.png)
    ![Screenshot from 2021-11-25 17-07-08](https://user-images.githubusercontent.com/3050060/143473757-eecaaf2b-f4f0-49e0-a159-ab485e3f7122.png)
    
    To fix it, I simply unset the `overflow-y` on the source code page so it's not displayed anymore.
    
    r? ``@jsha``
    matthiaskrgr authored Nov 26, 2021
    Configuration menu
    Copy the full SHA
    a9710de View commit details
    Browse the repository at this point in the history