[LLVMdev] Making Sense of ISel DAG Output
gohman at apple.com
Thu Oct 2 17:22:44 PDT 2008
On Oct 2, 2008, at 2:15 PM, David Greene wrote:
> On Thursday 02 October 2008 15:37, Dan Gohman wrote:
>> Also, you can call viewGraph() from within a debugger, to view
>> the graph at arbitrary point in the middle of the selection
>> process. You can can even put a breakpoint on the Select
>> function and view the graph as each individual instruction is
> That might be more helpful. Thanks for the tip!
> Which Select function are you referring to?
For example, X86DAGToDAGISel::Select, for the x86 target.
>> It can get hairy with really large graphs, but if you're trying
>> to understand instruction selection, it's often possible to reduce
>> the testcases to a readable scale while still including the
>> interesting parts. SelectionDAG's setGraphColor method can also
>> help when graphs get large.
> Unfortunately, the testcase is about as simple as it can get: a loop
> with a
> gather, a multiply and a store. Maybe I can hand-whittle some IR.
Another trick is to place an abort() call somewhere in codegen
such that it will be called whenever the construct of interest
is processed, and then run bugpoint. If it works, the result
is a reduced testcase that's still interesting :-).
A feature that would be really useful for large graphs that LLVM
doesn't yet have is the ability to display subsets of the graph.
For example, take a node of interest and show just it and its
operands and its users. Or maybe two or three or N levels of
More information about the llvm-dev