1. 31 12月, 2020 2 次提交
  2. 26 12月, 2020 8 次提交
  3. 24 12月, 2020 25 次提交
  4. 23 12月, 2020 5 次提交
    • B
      Auto merge of #80328 - flip1995:clippyup, r=Mark-Simulacrum · e937ae94
      bors 提交于
      Clippy: Revert change from last sync
      
      r? `@Manishearth`
      
      cc `@ebroto`
      
      Note that the commit e8980155 doesn't exist like this in the Clippy repo. I didn't want to do a full sync, because this would've included at least one new lint, which I wanted to avoid a week before beta is branched. This just reverts one commit from the last sync.
      e937ae94
    • B
      Auto merge of #80262 - Mark-Simulacrum:pgo-rustc, r=pietroalbini · 3ffea60d
      bors 提交于
      Utilize PGO for rustc linux dist builds
      
      This implements support for applying PGO to the rustc compilation step (not
      standard library or any tooling, including rustdoc). Expanding PGO to more tools
      is not terribly difficult but will involve more work and greater CI time
      commitment.
      
      For the same reason of avoiding greater implementation time commitment,
      implementing for platforms outside of x86_64-unknown-linux-gnu is skipped.
      In practice it should be quite simple to extend over time to more platforms. The
      initial implementation is intentionally minimal here to avoid too much work
      investment before we start seeing wins for a subset of Rust users.
      
      The choice of workloads to profile here is somewhat arbitrary, but the general
      rationale was to aim for a small set that largely avoided time regressions on
      perf.rust-lang.org's full suite of crates. The set chosen is libcore, cargo (and
      its dependencies), and a few ad-hoc stress tests from perf.rlo. The stress tests
      are arguably the most controversial, but they benefit those cases (avoiding
      regressions) and do not really remove wins from other benchmarks.
      
      The primary next step after this PR lands is to implement support for PGO in
      LLVM. It is unclear whether we can afford a full LLVM rebuild in CI, though, so
      the approach taken there may need to be more staggered. rustc-only PGO seems
      well affordable on linux at least, giving us up to 20% wall time wins on some
      crates for 15 minutes of extra CI time (1 hour with this PR, up from 45 minutes).
      
      The PGO data is uploaded to allow others to reuse it if attempting to reproduce
      the CI build or potentially, in the future, on other platforms where an
      off-by-one strategy is used for dist builds at minimal performance cost.
      
      r? `@michaelwoerister` (but tell me if you don't want to / don't feel comfortable approving and we can find others)
      3ffea60d
    • F
      Special sync of 'e8980155' · 2accbf1a
      flip1995 提交于
      2accbf1a
    • P
      Revert "Pass Clippy args also trough RUSTFLAGS" · e8980155
      Philipp Krones 提交于
      e8980155
    • B
      Auto merge of #79261 - faern:deprecate-compare-and-swap, r=Amanieu · 87eecd40
      bors 提交于
      Deprecate atomic compare_and_swap method
      
      Finish implementing [RFC 1443](https://github.com/rust-lang/rfcs/blob/master/text/1443-extended-compare-and-swap.md) (https://github.com/rust-lang/rfcs/pull/1443).
      
      It was decided to deprecate `compare_and_swap` [back in Rust 1.12 already](https://github.com/rust-lang/rust/issues/31767#issuecomment-215903038). I can't find any info about that decision being reverted. My understanding is just that it has been forgotten. If there has been a decision on keeping `compare_and_swap` then it's hard to find, and even if this PR does not go through it can act as a place where people can find out about the decision being reverted.
      
      Atomic operations are hard to understand, very hard. And it does not help that there are multiple similar methods to do compare and swap with. They are so similar that for a reader it might be hard to understand the difference. This PR aims to make that simpler by finally deprecating `compare_and_swap` which is essentially just a more limited version of `compare_exchange`. The documentation is also updated (according to the RFC text) to explain the differences a bit better.
      
      Even if we decide to not deprecate `compare_and_swap`. I still think the documentation for the atomic operations should be improved to better describe their differences and similarities. And the documentation can be written nicer than the PR currently proposes, but I wanted to start somewhere. Most of it is just copied from the RFC.
      
      The documentation for `compare_exchange` and `compare_exchange_weak` indeed describe how they work! The problem is that they are more complex and harder to understand than `compare_and_swap`. So for someone who does not fully grasp this they might fall back to using `compare_and_swap`. Making the documentation outline the similarities and differences might build a bridge for people so they can cross over to the more powerful and sometimes more efficient operations.
      
      The conversions I do to avoid the `std` internal deprecation errors are very straight forward `compare_and_swap -> compare_exchange` changes where the orderings are just using the mapping in the new documentation. Only in one place did I use `compare_exchange_weak`. This can probably be improved further. But the goal here was not for those operations to be perfect. Just to not get worse and to allow the deprecation to happen.
      87eecd40