Skip to content

Commit 2a8d0e5

Browse files
#57 add options to dump the IR after intermediate steps
1 parent e922fb9 commit 2a8d0e5

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

optvm/src/main/java/com/compilerprogramming/ezlang/compiler/ExitSSABoissinotNoCoalesce.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,12 @@ public ExitSSABoissinotNoCoalesce(CompiledFunction function, EnumSet<Options> op
4141
allBlocks = function.getBlocks();
4242
init();
4343
makeConventionalSSA();
44+
if (options.contains(Options.DUMP_SSA_TO_CSSA)) function.dumpIR(false, "After converting from SSA to CSSA");
4445
removePhis();
46+
if (options.contains(Options.DUMP_CSSA_PHI_REMOVAL)) function.dumpIR(false, "After removing phis from CSSA");
4547
sequenceParallelCopies();
4648
function.isSSA = false;
47-
if (options.contains(Options.DUMP_POST_SSA_IR)) function.dumpIR(false, "After exiting SSA");
49+
if (options.contains(Options.DUMP_POST_SSA_IR)) function.dumpIR(false, "After exiting SSA (Boissinot method)");
4850
}
4951

5052
private void init() {

optvm/src/main/java/com/compilerprogramming/ezlang/compiler/Options.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ public enum Options {
2020
DUMP_CCP_POSTAPPLY,
2121
DUMP_SSA_LIVENESS,
2222
DUMP_SSA_DOMTREE,
23+
DUMP_SSA_TO_CSSA,
24+
DUMP_CSSA_PHI_REMOVAL,
2325
DUMP_POST_SSA_IR,
2426
DUMP_INTERFERENCE_GRAPH,
2527
DUMP_CHAITIN_COALESCE,

0 commit comments

Comments
 (0)