After legalization and DAG combination, the
SelectionDAG representation is in the optimized phase. However, the instructions represented are still target-independent and need to be mapped on target-specific instructions. The instruction selection phase takes the target-independent DAG nodes as the input, matches patterns in them, and gives the output DAG nodes, which are target-specific.
TableGen DAG instruction selector generator reads the instruction patterns from the
.td file, and automatically builds parts of the pattern matching code.
SelectionDAGISel is the common base class used for pattern-matching instruction selectors that are based on
SelectionDAG. It inherits the