DAG(Directed acyclic graph): A Directed acyclic graph is a graph with no cycles which gives a picture of how the value computed by each statement in a basic block is used in subsequent statement in the block . That is, a DAG has node for every sub-expression of the expression. An interior node represents n operator & its child represents an operand.
DAG is mainly used to identify the same expression.
Example: Let us the following expression-
a + a*(b-c)+(b-c)*d.
0 comments:
Post a Comment