aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSchuyler Eldridge2019-04-19 10:42:40 -0400
committerSchuyler Eldridge2019-07-03 19:59:51 -0400
commitc219be2375fadcdd88851842e7b9029271230398 (patch)
tree95ffff0e2206ab568aa1540dec3fb2ff9a270c92 /src
parent2585bf986347e264f4c06c38dbcc83aaa554ec4f (diff)
Add PreservesAll stackable trait for DependencyAPI
This adds a PreservesAll that can be used to override the default invalidation scheme (invalidated everything except yourself) such that nothing is invalidated. Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
Diffstat (limited to 'src')
-rw-r--r--src/main/scala/firrtl/options/Phase.scala9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main/scala/firrtl/options/Phase.scala b/src/main/scala/firrtl/options/Phase.scala
index e4bb6f0d..e5aa87ec 100644
--- a/src/main/scala/firrtl/options/Phase.scala
+++ b/src/main/scala/firrtl/options/Phase.scala
@@ -86,6 +86,15 @@ trait DependencyAPI[A <: DependencyAPI[A]] { this: TransformLike[_] =>
}
+/** A trait indicating that no invalidations occur, i.e., all previous transforms are preserved
+ * @tparam A some [[TransformLike]]
+ */
+trait PreservesAll[A <: DependencyAPI[A]] { this: DependencyAPI[A] =>
+
+ override def invalidates(a: A): Boolean = false
+
+}
+
/** A mathematical transformation of an [[AnnotationSeq]].
*
* A [[firrtl.options.Phase Phase]] forms one unit in the Chisel/FIRRTL Hardware Compiler Framework (HCF). The HCF is