Dependencies in ISel DAG of LLVM

258 阅读1分钟

Three kinds of dependencies in ISel DAG.

  1. Execution Dependency, represented by Chain, Blue dash line in DAG view, means the targeted Operation (SDNode) should executed before the targeting one, even no data dependency between them.
  2. Data Dependency, represented by Operands of a SDNode, Dark solid line in DAG view, means the result of targeted Operation is operand of the targeting Operation.
  3. Binding Dependency, represented by Glue, Red solid line in DAG view, means targeted and targeting operations should glue together as one schedule unit.

By the way, Operands of an operation can be in order.

  1. Chain.
  2. Results of other Operations, with types.
  3. Glue.

And Results of an operation can be in order.

  1. Results with Types.
  2. Chain.
  3. Glue.

Example showed in following image, focusing on CopyFromReg SDNode.