rust-lang / rust-lang/polonius
Revisit the "Location::All" hack
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 1.7k
- Forks
- 86
- PR merge metrics
- No merged PRs in 30d
Description
As part of the nll-facts borrowck work, I added the idea of outlives relation that occur at all points. I did my best to explain it here:
I handled this by adding the relevant outlives relationships to all points. But, looking at the outlives.facts I saw that these relations account for a LOT of noise. Of the ~500K tuples in that file, about half are due to this. =) Moreover, these tuples will mess up any optimizations like #20. It's clear we need a better approach, but I'm not sure what.
That said, manually removing those tuples and re-running the analysis shows that they only have a small effect on overall performance (from ~40s to ~35s).
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the explanation in src/librustc_mir/borrow_check/nll/type_check/mod.rs at lines 627-657, then inspect the outlives.facts data described in the issue. Investigate an alternative to adding these outlives relationships at all points, with the goal of reducing tuple noise while preserving the analysis and considering the effect on optimizations such as #20.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100