I am often confused about the relationship between SelectionDAG and SelectionDAGISel, also some other related classes as SelectionDAGLowering. Understanding their relationship in the high level would be very useful.
Asked
Active
Viewed 530 times
1 Answers
2
First, I would like to give you a couple of wonderful links to read about instruction selection:
In a nutshell, SelectionDAG
is a kind of internal representation with explicit instruction dependencies. It is used for instruction selection and scheduling (DAG example).
SelectionDAGISel
is a pass that converts machine independent LLVM IR into machine dependent representation (MachineFunction
, MachineBasicBlock
, MachineInstr
), i.e. the pass builds SelectionDAG
and performs instruction selection and scheduling. It is subclassed by specific targets, e.g. ARMDAGToDAGISel
.
SelectionDAGBuilder
is a class that builds SelectionDAG
from LLVM IR.
I'm not sure about SelectionDAGLowering
. It seems that it's the old name for SelectionDAGBuilder
class.