rust-lang / rust-lang/polonius

Idea: condense CFG

Open
#20 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
1.7k
Forks
86
PR merge metrics
No merged PRs in 30d

Description

Currently we have an awful lot of points. However, it is rare that we need so many. I'm not sure of the exact conditions when we can compress two points, but it seems clear that we can. For example, if we have two points P and Q where

  • P has one successor (Q)
  • Q has one predecessor (P)
  • The set of live regions at P is equal to set of live regions at Q
  • There are no outlives relations at P or Q

then I think pretty clearly the subset relation would be the same during both of them.

We often know the first condition (one succ, one pred) just structurally: only the start of a basic block can have multiple preds, and only the mid point of a terminator can have multiple successors. The set of live regions is also easily approximated using the set of live variables, I imagine.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by examining Polonius's current control-flow graph representation and how live regions, live variables, and outlives relations are computed. Define the conditions under which adjacent points preserve the subset relation, then validate the condensation behavior against representative CFGs; the issue names no files or tests.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.