diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/main/scala/firrtl/options/DependencyManager.scala | 9 | ||||
| -rw-r--r-- | src/main/scala/firrtl/options/Phase.scala | 6 |
2 files changed, 10 insertions, 5 deletions
diff --git a/src/main/scala/firrtl/options/DependencyManager.scala b/src/main/scala/firrtl/options/DependencyManager.scala index 910d44bb..ee6a7404 100644 --- a/src/main/scala/firrtl/options/DependencyManager.scala +++ b/src/main/scala/firrtl/options/DependencyManager.scala @@ -167,8 +167,13 @@ trait DependencyManager[A, B <: TransformLike[A] with DependencyAPI[B]] extends blacklist = _currentState, /* Explore all invalidated transforms **EXCEPT** the current transform! */ - extractor = (p: B) => v.filter(p.invalidates).map(oToD(_)).toSet - oToD(p))) - .reverse + extractor = (p: B) => { + val filtered = new LinkedHashSet[Dependency[B]] + filtered ++= v.filter(p.invalidates).map(oToD(_)) + filtered -= oToD(p) + filtered + }) + ).reverse } /** Wrap a possible [[CyclicException]] thrown by a thunk in a [[DependencyManagerException]] */ diff --git a/src/main/scala/firrtl/options/Phase.scala b/src/main/scala/firrtl/options/Phase.scala index 6dd5d969..2d08318e 100644 --- a/src/main/scala/firrtl/options/Phase.scala +++ b/src/main/scala/firrtl/options/Phase.scala @@ -125,14 +125,14 @@ trait DependencyAPI[A <: DependencyAPI[A]] { this: TransformLike[_] => * $seqNote */ def prerequisites: Seq[Dependency[A]] = Seq.empty - private[options] lazy val _prerequisites: LinkedHashSet[Dependency[A]] = new LinkedHashSet() ++ prerequisites.toSet + private[options] lazy val _prerequisites: LinkedHashSet[Dependency[A]] = new LinkedHashSet() ++ prerequisites /** All transforms that, if a prerequisite of *another* transform, will run before this transform. * $seqNote */ def optionalPrerequisites: Seq[Dependency[A]] = Seq.empty private[options] lazy val _optionalPrerequisites: LinkedHashSet[Dependency[A]] = - new LinkedHashSet() ++ optionalPrerequisites.toSet + new LinkedHashSet() ++ optionalPrerequisites /** All transforms that must run ''after'' this transform * @@ -171,7 +171,7 @@ trait DependencyAPI[A <: DependencyAPI[A]] { this: TransformLike[_] => */ def optionalPrerequisiteOf: Seq[Dependency[A]] = dependents private[options] lazy val _optionalPrerequisiteOf: LinkedHashSet[Dependency[A]] = - new LinkedHashSet() ++ optionalPrerequisiteOf.toSet + new LinkedHashSet() ++ optionalPrerequisiteOf /** A function that, given *another* transform (parameter `a`) will return true if this transform invalidates/undos the * effects of the *other* transform (parameter `a`). |
