take the following simple IR code from .ll file for example ：
%6 = mul nsw i64 %4, %5
In stage of Legalized selection DAG, this “mul” operation will be translated to ISD Node SMUL_LOHI. If my backend still has some bugs and can not generate .s file yet (other wise, I could use Graphviz to check the ISD Node) . How can I check What ISD DAG will be generated according to the given .ll file ?
You are right sir !
run llc with-view-dag-combine1-dags option would fail with a broken .dot file which can’t be opened or viewed by Graphviz if my program can’t generate the .s file yet.
But ! if I use gdb tool and set a break point before the selection stage of the instruction my backend didn’t support, and print CurDAG->viewGraph , it can generate a normal .dot file and can be opened with Graphviz.
Thank you very much !
By the way, years passed by, LLVM still does not have a human-friendly visual debugging tool,