Should SelectionDAG Chain represent all memory dependies

Hi all:

I’m attempting to improve the way that stores are merged in the Selection DAG and it looks like memory-memory dependencies are not completely stored in the Chain, and one must also consider data dependencies in the analysis. While this makes for a less complex DAG, it also means that that when we attempt to parallelize Memory operations must search through all possible predecessor nodes in the DAG for potential aliases (expensive) or we must be very conservative.
Our current store merge analysis partially works around this by special casing some common patterns, but if we could efficiently check through all necessary dependencies during alias analysis we could have a more complete and simpler merge step.

The obvious fix is to change the DAG to represent all such information in the Chain and deal with the messier graph, but I wanted to first see the list’s thoughts on the matter.

-Nirav