diff options
| author | Jack Koenig | 2017-06-13 10:42:20 -0700 |
|---|---|---|
| committer | Jack Koenig | 2017-06-13 16:01:52 -0700 |
| commit | 6bd6f3b014acee01d2f8fa823776d586646083d0 (patch) | |
| tree | fd2388ee734c4fc7674667fc5b42d97b0a8fdb00 /src | |
| parent | 51fb6db4fc82aba80650f6e98267b34fcea14122 (diff) | |
Canonicalize spacing in RemoveValidIf
Diffstat (limited to 'src')
| -rw-r--r-- | src/main/scala/firrtl/passes/RemoveValidIf.scala | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/main/scala/firrtl/passes/RemoveValidIf.scala b/src/main/scala/firrtl/passes/RemoveValidIf.scala index 865143a5..9405c0f5 100644 --- a/src/main/scala/firrtl/passes/RemoveValidIf.scala +++ b/src/main/scala/firrtl/passes/RemoveValidIf.scala @@ -7,22 +7,22 @@ import firrtl.ir._ // Removes ValidIf as an optimization object RemoveValidIf extends Pass { - // Recursive. Removes ValidIf's - private def onExp(e: Expression): Expression = { - e map onExp match { - case ValidIf(cond, value, tpe) => value - case x => x - } - } - // Recursive. - private def onStmt(s: Statement): Statement = s map onStmt map onExp + // Recursive. Removes ValidIf's + private def onExp(e: Expression): Expression = { + e map onExp match { + case ValidIf(cond, value, tpe) => value + case x => x + } + } + // Recursive. + private def onStmt(s: Statement): Statement = s map onStmt map onExp - private def onModule(m: DefModule): DefModule = { - m match { - case m: Module => Module(m.info, m.name, m.ports, onStmt(m.body)) - case m: ExtModule => m - } - } + private def onModule(m: DefModule): DefModule = { + m match { + case m: Module => Module(m.info, m.name, m.ports, onStmt(m.body)) + case m: ExtModule => m + } + } - def run(c: Circuit): Circuit = Circuit(c.info, c.modules.map(onModule), c.main) + def run(c: Circuit): Circuit = Circuit(c.info, c.modules.map(onModule), c.main) } |
