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

Idea: condense CFG #20

Open
nikomatsakis opened this issue May 10, 2018 · 0 comments
Open

Idea: condense CFG #20

nikomatsakis opened this issue May 10, 2018 · 0 comments

Comments

@nikomatsakis
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant