Traverse SelectionDAG in gdb


I am some difficulty in traversing and quering about selectionDAG.

One great way of doing it is through Dot as described in the docs. However, in my case the llvm source code is installed on a remote linux machine and I am accessing it through a Windows PC. So the “popping out” of graphs is not possible. Is there a way that I can dump the output of viewGraph() in a file and run dot over it offline and then copy the final pictures to my windows machine to have some idea about the SelectionDAG.

Also, can someone please point me to a location in source code where selectionDAG is traversed. So that I may use similar code to traverse and know about the structure of Selection DAG. If something like this is possible through gdb, it will be even better.


On linux, when you dump the graph, it saves it to the /tmp directory.