| Age | Commit message (Collapse) | Author |
|
This is a bug fix, before this PR, Scala compiler will infer `Nothing`, which makes code below failed to compile:
```
class UserCompiler extends TransformManager(Seq(Dependency(UserPass))) {
override def optionalPrerequisiteOf: Seq[TransformDependency] = Seq(
Dependency[DedupModules]
)
}
```
|
|
With Stage/Phase, users can provide complex functionality at the phase
level rather than just the transform level. It is useful to have the
same logging information at that level. Note that this change still logs
transforms in the same way, but now the time in inclusive of annotation
renaming which can also [unfortunately] be slow.
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
|
|
* Check Unidoc on all versions of Scala
It is required for publishing and we publish every version
* Fix conflicting cross-version suffixes issue
When running `sbt ++2.13.4 unidoc`, SBT would set the Scala version
for the fuzzer and benchmark projects even though they aren't really
relevant to the command. This may be a misconfiguration or a bug in
the unidoc plugin. Whatever the case, simply making it possible for
them to use the same version of Scala as the firrtl project (on which
they depend) fixes the issue.
* Match versions of Scala in build.sbt and CI
* Fix unidoc issues in 2.13.4
There is some bug in ScalaDoc not finding some links in firrtl.options
so those links were made absolute as a workaround.
|
|
|
|
|
|
* delete usages of toSet for determinism
* add formatting suggestion from code review
|
|
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
|
|
This mixes in the new DependencyAPIMigration trait into all Transforms
and Passes. This enables in-tree transforms/passes to build without
deprecation warnings associated with the deprecated CircuitForm.
As a consequence of this, every Transform now has UnknownForm as both
its inputForm and outputForm. This PR modifies legacy Compiler and
testing infrastructure to schedule transforms NOT using
mergeTransforms/getLoweringTransforms (which rely on inputForm and
outputForm not being UnknownForm), but instead using the Dependency
API.
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
|
|
Changes the DependencyManager to use the private[options]
LinkedHashSet members that shadow the public Seq[_] dependencies. This
should avoid some unnecessary set construction and also improves
readability of the DependencyManager code.
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
|
|
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
|
|
This adds a prettyPrint method to the DependencyManager to enable
textual visualization of the TransformLikes that a DependencyManager
determines need to be run.
This also cleans up the GraphViz visualization with better edge
coloring and now uses the `name` method when labeling graphviz nodes.
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
|
|
This makes a change to the Dependency API that breaks chisel3. This
needs to [skip chisel tests], but is fixed with
https://github.com/freechipsproject/chisel3/pull/1270.
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
|
|
This changes uses of `getSimpleName` to `getName`. The former throws
idiotic exceptions under Java 8, e.g., `getSimpleName` will fail if
used on a class inside an object.
This fixes a bug where any call to the `name` method of a custom
transform defined inside an object (or in an environment wrapping
things in objects like a REPL) will throw a malformed class name
exception. E.g., if you do this and run with `-ll info` or your custom
transform deletes annotations.
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
|
|
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
|
|
This changes the Dependency API to specify dependencies in terms of
classes subtyping the DependencyAPI trait. Previously, this was
invariant which caused a bunch of ugly, unneeded .asInstanceOf jank.
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
|
|
Adds the DependencyManager class which can be used to determine a
legal sequence of TransformLikes given their Dependency API
constraints. A DependencyManager determines an ordering that results
in some target TransformLikes being run (without invalidations) given
an initial state (some other set of TransformLikes).
Algorithmically, this works as follows:
1. A DAG of TransformLikes w/ invalidation edges is constructed (the
"invalidate graph")
2. A DAG of TransformLikes w/ prerequisite and dependent edges is
constructed (the "dependents graph")
3. A toplogical sort of the dependents graph, seeded with the reverse
topological sort of the invalidate graph, gives an ordering of
TransformLikes.
4. This ordering is examined, node by node, cleaning up any mismatches
between TransformLikes by solving DependencyManager sub-problems.
As new graph nodes (which are classes) are found, these are lazily
constructed. Data structures are maintained that map from classes to
objects and back. All discovered classes will point to the same object.
Determinism is maintained internally using LinkedHashMap and
LinkedHashSet.
Other changes:
- Some methods that generate Graphviz for a DependencyManager are
added.
- One concrete implementation of a DependencyManager is added for
Phases called "PhaseManager".
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
|