Commit 2e39ddbb authored by Schuyler Eldridge's avatar Schuyler Eldridge
Browse files

Add firrtl.options.PhaseManager



This adds the PhaseManager class which can be used to determine a
sequence of Phases that should be run given the new Dependency API. A
PhaseManager determines an ordering that results in some target Phases
being run (without invalidations) given an initial state (some other
set of Phases).

This follows the original suggestion of @azidar with one (critical)
modification to the algorithm: the (DFS-based) topological sort of
dependencies is seeded using a topological sort of the
invalidations (this uses the DiGraph.seededLinearize method). This
ensures that the number of repeated Phases is kept to a minimum. (I am
not sure if this is actually optimal, however.)

This additionally adds some methods that generate Graphviz for the
Prerequisite/Invalidate graph.

Signed-off-by: default avatarSchuyler Eldridge <schuyler.eldridge@ibm.com>
parent 1fec1197
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment