[LLVMdev] initial selection DAG

Tim Northover t.p.northover at gmail.com
Fri Oct 12 02:39:46 PDT 2012

Hi Nico,

> I miss three nodes and I wonder what do I have to implement to get at least the right initial selection DAG?

Most of the work is done by the files in lib/CodeGen/SelectionDAG
(first SelectionDAGBuilder.cpp, then the Legalizers and DAGCombiner) .
However, various target-specific hooks are used during the process
(the biggest handling function-calls and formal parameters). These
hooks and the data that effect them are defined in

What should the nodes you're missing be doing? It's difficult to say
quite what part of ISelLowering you need to look at without knowing

> Do I have to define all instructions in the td files first?

No. In principle you should be able to get a fully correct selection
dag without defining a single instruction. It wouldn't be much use for
most targets, but it would exist.


More information about the llvm-dev mailing list