A nice debugging feature when developing LLVM backends is to display the various intermediate graphs visually. The static compiler 'llc' allows you to do this using one of the following flags:
-view-dag-combine1-dags displays the DAG after being built, before the first optimization pass.
-view-legalize-dags displays the DAG before Legalization.
-view-dag-combine2-dags displays the DAG before the second optimization pass.
-view-isel-dags displays the DAG before the Select phase.
-view-sched-dags displays the DAG before Scheduling.
However, the graphviz binaries built with Mac Ports draws graphs that are difficult to read and have visual artifacts. Using the GraphViz GUI viewer fixes this. First, install the package:
Then edit your CMakeCache.txt to replace the dotty binary:
//Path to a program.