blob: e765d1f453cab0db24a292179ddcf336c2a96f37 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
package firrtl
package passes
import scala.collection.mutable
import firrtl.Mappers.{ExpMap, StmtMap}
import firrtl.ir._
object RemoveEmpty extends Pass {
def name = "Remove Empty Statements"
private def onModule(m: DefModule): DefModule = {
m match {
case m: Module => Module(m.info, m.name, m.ports, Utils.squashEmpty(m.body))
case m: ExtModule => m
}
}
def run(c: Circuit): Circuit = Circuit(c.info, c.modules.map(onModule _), c.main)
}
// vim: set ts=4 sw=4 et:
|