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:
Schuyler Eldridge <schuyler.eldridge@ibm.com>
parent
1fec1197
Please register or sign in to comment