[DDG] Data Dependence Graph - Graph Simplification

Summary:

This is the last functional patch affecting the representation of DDG.

Here we try to simplify the DDG to reduce the number of nodes and edges by

iteratively merging pairs of nodes that satisfy the following conditions,

until no such pair can be identified. A pair of nodes consisting of a and b

can be merged if:

- the only edge from a is a def-use edge to b and
- the only edge to b is a def-use edge from a and
- there is no cyclic edge from b to a and
- all instructions in a and b belong to the same basic block and
- both a and b are simple (single or multi instruction) nodes.

These criteria allow us to fold many uninteresting def-use edges that

commonly exist in the graph while avoiding the risk of introducing

dependencies that didn't exist before.

Authored By: bmahjour

Reviewer: Meinersbur, fhahn, myhsu, xtian, dmgreen, kbarton, jdoerfert

Reviewed By: Meinersbur

Subscribers: ychen, arphaman, simoll, a.elovikov, mgorny, hiraditya, jfb, wuzish, llvm-commits, jsji, Whitney, etiotto, ppc-slack

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D72350