[DAG] Prune cycle check in store merge.
authorNirav Dave <niravd@google.com>
Wed, 16 May 2018 16:48:20 +0000 (16:48 +0000)
committerNirav Dave <niravd@google.com>
Wed, 16 May 2018 16:48:20 +0000 (16:48 +0000)
commit11fd14c1ac219fcf0cebe1760dc459d1d5f20d87
tree912f7313d10f687e19352a279e8d4081dcd9b41a
parentd9d86cb7386daf050ecb6c329109ac3b61587852
[DAG] Prune cycle check in store merge.

As part of merging stores we check that fusing the nodes does not
cause a cycle due to one candidate store being indirectly dependent on
another store (this may happen via chained memory copies). This is
done by searching if a store is a predecessor to another store's
value.

Prune the search at the candidate search's root node which is a
predecessor to all candidate stores. This reduces the
size of the subgraph searched in large basic blocks.

Reviewers: jyknight

Subscribers: llvm-commits, hiraditya

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

llvm-svn: 332490
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp