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 11 pull requests #33582

Closed
wants to merge 26 commits into from
Closed

Commits on May 10, 2016

  1. Configuration menu
    Copy the full SHA
    df572fc View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    417fe6d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    eed8d70 View commit details
    Browse the repository at this point in the history
  4. Remove needless pubs

    jseyfried committed May 10, 2016
    Configuration menu
    Copy the full SHA
    8d5c578 View commit details
    Browse the repository at this point in the history
  5. Copy more libraries from local Rust to stage0

    When bootstrapping Rust using a previously built toolchain, I noticed
    a number of libraries were not copied in. As a result the copied in
    rustc fails to execute because it can't find all its dependences.
    
    Add them into the local_stage0.sh script.
    antonblanchard committed May 10, 2016
    Configuration menu
    Copy the full SHA
    0a38089 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    946efcd View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    3927ff4 View commit details
    Browse the repository at this point in the history
  8. Refactor hir::lowering API

    jseyfried committed May 10, 2016
    Configuration menu
    Copy the full SHA
    33978b0 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    e5a91b7 View commit details
    Browse the repository at this point in the history

Commits on May 11, 2016

  1. Don't use env::current_exe with libbacktrace

    If the path we give to libbacktrace doesn't actually correspond to the
    current process, libbacktrace will segfault *at best*.
    
    cc rust-lang#21889
    sfackler committed May 11, 2016
    Configuration menu
    Copy the full SHA
    9c2e691 View commit details
    Browse the repository at this point in the history
  2. Only break critical edges where actually needed

    Currently, to prepare for MIR trans, we break _all_ critical edges,
    although we only actually need to do this for edges originating from a
    call that gets translated to an invoke instruction in LLVM.
    
    This has the unfortunate effect of undoing a bunch of the things that
    SimplifyCfg has done. A particularly bad case arises when you have a
    C-like enum with N variants and a derived PartialEq implementation.
    
    In that case, the match on the (&lhs, &rhs) tuple gets translated into
    nested matches with N arms each and a basic block each, resulting in N²
    basic blocks. SimplifyCfg reduces that to roughly 2*N basic blocks, but
    breaking the critical edges means that we go back to N².
    
    In nickel.rs, there is such an enum with roughly N=800. So we get about
    640K basic blocks or 2.5M lines of LLVM IR. LLVM takes a while to
    reduce that to the final "disr_a == disr_b".
    
    So before this patch, we had 2.5M lines of IR with 640K basic blocks,
    which took about about 3.6s in LLVM to get optimized and translated.
    After this patch, we get about 650K lines with about 1.6K basic blocks
    and spent a little less than 0.2s in LLVM.
    
    cc rust-lang#33111
    dotdash committed May 11, 2016
    Configuration menu
    Copy the full SHA
    00f6513 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    1ebb07e View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    5541fdf View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    4e5a2e0 View commit details
    Browse the repository at this point in the history
  6. Export OnceState from libstd

    Amanieu committed May 11, 2016
    Configuration menu
    Copy the full SHA
    c91b104 View commit details
    Browse the repository at this point in the history
  7. [MIR trans] Optimize trans for biased switches

    Currently, all switches in MIR are exhausitive, meaning that we can have
    a lot of arms that all go to the same basic block, the extreme case
    being an if-let expression which results in just 2 possible cases, be
    might end up with hundreds of arms for large enums.
    
    To improve this situation and give LLVM less code to chew on, we can
    detect whether there's a pre-dominant target basic block in a switch
    and then promote this to be the default target, not translating the
    corresponding arms at all.
    
    In combination with rust-lang#33544 this makes unoptimized MIR trans of
    nickel.rs as fast as using old trans and greatly improves the times for
    optimized builds, which are only 30-40% slower instead of ~300%.
    
    cc rust-lang#33111
    dotdash committed May 11, 2016
    Configuration menu
    Copy the full SHA
    49b2cdf View commit details
    Browse the repository at this point in the history

Commits on May 12, 2016

  1. Rollup merge of rust-lang#33531 - antonblanchard:local_stage0_fix, r=…

    …alexcrichton
    
    Copy more libraries from local Rust to stage0
    
    When bootstrapping Rust using a previously built toolchain, I noticed
    a number of libraries were not copied in. As a result the copied in
    rustc fails to execute because it can't find all its dependences.
    
    Add them into the local_stage0.sh script.
    Manishearth committed May 12, 2016
    Configuration menu
    Copy the full SHA
    52e3d1e View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#33532 - jseyfried:mutable_lowering_context,…

    … r=nrc
    
    Clean up `hir::lowering`
    
    Clean up `hir::lowering`:
     - give lowering functions mutable access to the lowering context
     - refactor the `lower_*` functions and other functions that take a lowering context into methods
     - simplify the API that `hir::lowering` exposes to `driver`
     - other miscellaneous cleanups
    
    r? @nrc
    Manishearth committed May 12, 2016
    Configuration menu
    Copy the full SHA
    b2b1516 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#33541 - eddyb:promote-only-temps, r=arielb1

    mir: don't attempt to promote Unpromotable constant temps.
    
    Fixes rust-lang#33537. This was a non-problem in regular functions, but we also promote in `const fn`s.
    There we always qualify temps so you can't depend on `Unpromotable` temps being `NOT_CONST`.
    Manishearth committed May 12, 2016
    Configuration menu
    Copy the full SHA
    0d8101a View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#33544 - dotdash:baby_dont_break_me_no_more,…

    … r=Aatch
    
    Only break critical edges where actually needed
    
    Currently, to prepare for MIR trans, we break _all_ critical edges,
    although we only actually need to do this for edges originating from a
    call that gets translated to an invoke instruction in LLVM.
    
    This has the unfortunate effect of undoing a bunch of the things that
    SimplifyCfg has done. A particularly bad case arises when you have a
    C-like enum with N variants and a derived PartialEq implementation.
    
    In that case, the match on the (&lhs, &rhs) tuple gets translated into
    nested matches with N arms each and a basic block each, resulting in N²
    basic blocks. SimplifyCfg reduces that to roughly 2*N basic blocks, but
    breaking the critical edges means that we go back to N².
    
    In nickel.rs, there is such an enum with roughly N=800. So we get about
    640K basic blocks or 2.5M lines of LLVM IR. LLVM takes a while to
    reduce that to the final "disr_a == disr_b".
    
    So before this patch, we had 2.5M lines of IR with 640K basic blocks,
    which took about about 3.6s in LLVM to get optimized and translated.
    After this patch, we get about 650K lines with about 1.6K basic blocks
    and spent a little less than 0.2s in LLVM.
    
    cc rust-lang#33111
    
    r? @Aatch
    Manishearth committed May 12, 2016
    Configuration menu
    Copy the full SHA
    1954c83 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#33552 - dotdash:scfg, r=luqmana

    [MIR] Enhance the SimplifyCfg pass to merge consecutive blocks
    
    Updated from rust-lang#30238, including the changes suggested by @Aatch.
    Manishearth committed May 12, 2016
    Configuration menu
    Copy the full SHA
    3c8aa6e View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#33554 - sfackler:no-current-exe, r=alexcric…

    …hton
    
    Don't use env::current_exe with libbacktrace
    
    If the path we give to libbacktrace doesn't actually correspond to the
    current process, libbacktrace will segfault *at best*.
    
    cc rust-lang#21889
    
    r? @alexcrichton
    cc @semarie
    Manishearth committed May 12, 2016
    Configuration menu
    Copy the full SHA
    b4e4e84 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#33555 - soltanmm:ambiguous-nixon, r=nikomat…

    …sakis
    
    Remove unification despite ambiguity in projection
    
    Turns out that closures aren't explicitly considered in `project.rs`, so the ambiguity handling w.r.t. closures can just be removed as the change done in `select.rs` covers it.
    
    r? @nikomatsakis
    Manishearth committed May 12, 2016
    Configuration menu
    Copy the full SHA
    9812b71 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#33560 - eddyb:symtidy, r=alexcrichton

    Use symlink_metadata in tidy to avoid panicking on broken symlinks.
    
    r? @alexcrichton
    Manishearth committed May 12, 2016
    Configuration menu
    Copy the full SHA
    b171856 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#33563 - Amanieu:oncestate, r=alexcrichton

    Export OnceState from libstd
    
    This type is used in the signature of `call_once_force` but isn't exported from libstd.
    
    r? @alexcrichton
    Manishearth committed May 12, 2016
    Configuration menu
    Copy the full SHA
    5203448 View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#33566 - dotdash:biased_switch, r=nagisa

    [MIR trans] Optimize trans for biased switches
    
    Currently, all switches in MIR are exhausitive, meaning that we can have
    a lot of arms that all go to the same basic block, the extreme case
    being an if-let expression which results in just 2 possible cases, be
    might end up with hundreds of arms for large enums.
    
    To improve this situation and give LLVM less code to chew on, we can
    detect whether there's a pre-dominant target basic block in a switch
    and then promote this to be the default target, not translating the
    corresponding arms at all.
    
    In combination with rust-lang#33544 this makes unoptimized MIR trans of
    nickel.rs as fast as using old trans and greatly improves the times for
    optimized builds, which are only 30-40% slower instead of ~300%.
    
    cc rust-lang#33111
    Manishearth committed May 12, 2016
    Configuration menu
    Copy the full SHA
    32e6cbb View commit details
    Browse the repository at this point in the history