about summary refs log tree commit diff
path: root/src/librustc_data_structures/graph/scc
AgeCommit message (Collapse)AuthorLines
2018-12-25Remove licensesMark Rousskov-20/+0
2018-11-13fix various typos in doc commentsAndy Russell-1/+1
2018-07-13nit: fix `all_sccs` commentNiko Matsakis-1/+1
2018-07-13nit: tweak comment orderNiko Matsakis-21/+23
2018-07-13nit: improve SCC commentsNiko Matsakis-4/+19
2018-07-13nit: clarify "keep it around" commentNiko Matsakis-2/+2
2018-07-13nit: s/successor/successors/Niko Matsakis-2/+2
2018-07-13compute region values using SCCs not iterative flowNiko Matsakis-0/+5
The strategy is this: - we compute SCCs once all outlives constraints are known - we allocate a set of values **per region** for storing liveness - we allocate a set of values **per SCC** for storing the final values - when we add a liveness constraint to the region R, we also add it to the final value of the SCC to which R belongs - then we can apply the constraints by just walking the DAG for the SCCs and union'ing the children (which have their liveness constraints within) There are a few intermediate refactorings that I really ought to have broken out into their own commits: - reverse the constraint graph so that `R1: R2` means `R1 -> R2` and not `R2 -> R1`. This fits better with the SCC computation and new style of inference (`->` now means "take value from" and not "push value into") - this does affect some of the UI tests, since they traverse the graph, but mostly the artificial ones and they don't necessarily seem worse - put some things (constraint set, etc) into `Rc`. This lets us root them to permit mutation and iteration. It also guarantees they don't change, which is critical to the correctness of the algorithm. - Generalize various helpers that previously operated only on points to work on any sort of region element.
2018-07-12introduce a generic SCC computationNiko Matsakis-0/+519