Skip to content

Commit

Permalink
lowering: add option to dump lowering after every node
Browse files Browse the repository at this point in the history
  • Loading branch information
davleopo committed Dec 21, 2023
1 parent 94e6578 commit 8fa8599
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ public static class Options {
//@formatter:off
@Option(help = "Print schedule result pre lowering to TTY.", type = OptionType.Expert)
public static final OptionKey<Boolean> PrintLoweringScheduleToTTY = new OptionKey<>(false);
@Option(help = "Dump lowering after every node to igv.", type = OptionType.Expert)
public static final OptionKey<Boolean> DumpAfterEveryLowering = new OptionKey<>(false);
//@formatter:on
}

Expand Down Expand Up @@ -584,7 +586,6 @@ public void postprocess() {

@SuppressWarnings("try")
private AnchoringNode process(CoreProviders context, final HIRBlock b, final NodeBitMap activeGuards, final AnchoringNode startAnchor, ScheduleResult schedule) {

FixedWithNextNode lastFixedNode = b.getBeginNode();
if (b.getBeginNode() instanceof LoopExitNode) {
/**
Expand Down Expand Up @@ -693,6 +694,9 @@ private AnchoringNode process(CoreProviders context, final HIRBlock b, final Nod
}
loweringTool.setLastFixedNode((FixedWithNextNode) nextLastFixed);
}
if (Options.DumpAfterEveryLowering.getValue(debug.getOptions())) {
debug.dump(DebugContext.VERY_DETAILED_LEVEL, b.getBeginNode().graph(), "After lowering %s", node);
}
}
return loweringTool.getCurrentGuardAnchor();
}
Expand Down

0 comments on commit 8fa8599

Please sign in to comment.