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 5 pull requests #64598

Merged
merged 24 commits into from
Sep 19, 2019
Merged

Rollup of 5 pull requests #64598

merged 24 commits into from
Sep 19, 2019

Conversation

Centril
Copy link
Contributor

@Centril Centril commented Sep 19, 2019

Successful merges:

Failed merges:

r? @ghost

andjo403 and others added 24 commits September 14, 2019 10:49
there is a soft-error for older toolchains
from https://reviews.llvm.org/D57264 in preparation for the
hard error in https://reviews.llvm.org/D66188
This can be removed once dataflow-based const validation is merged.
This pulls in rust-lang/cargo#7159, which
ensures that documenting proc macros works correctly.
Update installed compiler dependencies

As llvm have updated the minimum toolchain
https://reviews.llvm.org/D66188
Update Cargo

This pulls in rust-lang/cargo#7159, which
ensures that documenting proc macros works correctly.
Polonius: more `ui` test suite fixes

Since rust-lang#62736, new tests have been added, and the `run-pass` suite was merged into the `ui` suite.

This PR adds the missing tests expectations for Polonius, and updates the existing ones where the NLL output has changed in some manner (e.g. ordering of notes)

Those are the trivial cases, but a more-detailed explanation is available [in this write-up](https://hackmd.io/CjYB0fs4Q9CweyeTdKWyEg?both#26-async-awaitasync-borrowck-escaping-closure-errorrs-outputs-from-NLL-Polonius-diff) starting at test case 26: they are only differing in diagnostics and instances of other existing test cases differences.

Only 3 of the 9020 tests are still "failing" at the moment (1 failure, 2 OOMs).

r? @nikomatsakis
…oli-obk

A more generic interface for dataflow analysis

rust-lang#64470 requires a transfer function that is slightly more complex than the typical `gen`/`kill` one. Namely, it must copy state bits between locals when assignments occur (see rust-lang#62547 for an attempt to make this fit into the existing framework). This PR contains a dataflow interface that allows for arbitrary transfer functions. The trade-off is efficiency: we can no longer coalesce transfer functions for blocks and must visit each statement individually while iterating to fixpoint.

Another issue is that poorly behaved transfer functions can result in an analysis that fails to converge. `gen`/`kill` sets do not have this problem. I believe that, in order to guarantee convergence, flipping a bit from `false` to `true` in the entry set cannot cause an output bit to go from `true` to `false` (negate all preceding booleans when `true` is the bottom value). Perhaps someone with a more formal background can confirm and we can add a section to the docs?

This approach is not maximally generic: it still requires that the lattice used for analysis is the powerset of values of `Analysis::Idx` for the `mir::Body` of interest. This can be done at a later date. Also, this is the bare minimum to get rust-lang#64470 working. I've not adapted the existing debug framework to work with the new analysis, so there are no `rustc_peek` tests either. I'm planning to do this after rust-lang#64470 is merged.

Finally, my ultimate plan is to make the existing, `gen`/`kill`-based `BitDenotation` a special case of `generic::Analysis`. Currently they share a ton of code. I should be able to do this without changing any implementers of `BitDenotation`. Something like:

```rust
struct GenKillAnalysis<A: BitDenotation> {
    trans_for_block: IndexVec<BasicBlock, GenKillSet<A::Idx>>,
    analysis: A,
}

impl<A> generic::Analysis for GenKillAnalysis<A> {
    // specializations of `apply_{partial,whole}_block_effect`...
}
```

r? @pnkfelix
…ievink

Fix a minor grammar nit, update UI tests

Minor fix, but I noticed it while debugging some code
@Centril
Copy link
Contributor Author

Centril commented Sep 19, 2019

@bors r+ p=5 rollup=never

@bors
Copy link
Contributor

bors commented Sep 19, 2019

📌 Commit cad2d58 has been approved by Centril

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Sep 19, 2019
@bors
Copy link
Contributor

bors commented Sep 19, 2019

⌛ Testing commit cad2d58 with merge 19d0703...

bors added a commit that referenced this pull request Sep 19, 2019
Rollup of 5 pull requests

Successful merges:

 - #63630 (Update installed compiler dependencies)
 - #64536 (Update Cargo)
 - #64554 (Polonius: more `ui` test suite fixes)
 - #64566 (A more generic interface for dataflow analysis)
 - #64591 (Fix a minor grammar nit, update UI tests)

Failed merges:

r? @ghost
@bors
Copy link
Contributor

bors commented Sep 19, 2019

☀️ Test successful - checks-azure
Approved by: Centril
Pushing 19d0703 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Sep 19, 2019
@bors bors merged commit cad2d58 into rust-lang:master Sep 19, 2019
@Centril Centril deleted the rollup-htmf39p branch September 19, 2019 13:55
@Centril Centril added the rollup A PR which is a rollup label Oct 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants