Skip to content

Commit

Permalink
tweak prettyprinter
Browse files Browse the repository at this point in the history
  • Loading branch information
ailrst committed Jan 6, 2025
1 parent e71c1fc commit d5a744b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/scala/translating/PrettyPrinter.scala
Original file line number Diff line number Diff line change
Expand Up @@ -253,15 +253,15 @@ class BasilIRPrettyPrinter() extends BasilIR[PPProg] {
val name = p.name
val inParams = p.formalInParam.toList.map(vparam)
val outParams = p.formalOutParam.toList.map(vparam)
val entryBlock = p.entryBlock.map(vblock)
val entryBlock = p.entryBlock
val middleBlocks =
(p.blocks.toSet -- p.entryBlock.toSet -- p.returnBlock.toSet).toList.sortBy(x => -x.rpoOrder).map(vblock)
(p.entryBlock.toList ++ (p.blocks.toSet -- p.entryBlock.toSet -- p.returnBlock.toSet).toList.sortBy(x => -x.rpoOrder)
++ p.returnBlock).map(vblock)
val returnBlock = p.returnBlock.map(vblock)

val localDecls = decls.toList.sorted

val iblocks = entryBlock.map(b => (s" entry = ${indent(b.toString)}")).toList
++ returnBlock.map(b => (s" exit = ${indent(b.toString)}")).toList
val iblocks = p.entryBlock.map(b => (s" entry_block = " + '"' + b.label + '"')).toList

val addr = p.address.map(l => vaddress(l).toString).map(" address = " + _).toList

Expand Down

0 comments on commit d5a744b

Please sign in to comment.