[PATCH] D18336: Prevent construction of cycle in DAG store merge

Nirav Dave via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 24 14:39:15 PDT 2016


niravd added a comment.

There are two cases we do. In the case of AA we look for stores which are
parallel in regards to the chain dependencies. Otherwise we walk up the
chain to merge stores. Either way we fail to check if there are data
dependencies that we contradict (i.e. make a cycle).

Your patch handles the later case only because it relies on the fact that
all stores are predecessors to the latest one and there are not multiple
chain descendent. Thus if we walk through uses of that we implicitly are
doing the walk for all of them but it wouldn't necessarily hold in the
parallel case.

You're right about us only needing one path. We could unify them modifying
the parallel case to searching up the non-chain operands and not stores
themselves to avoid chained stores from always failing. Once http://reviews.llvm.org/D14834 is
committed the nonparallel case will disappear and we can return to the
simpler case.


http://reviews.llvm.org/D18336





More information about the llvm-commits mailing list