This initial patch adds code to preserve MemorySSA through a run of SLP vectorizer. The eventual plan is to use MemorySSA to accelerate SLP's memory dependence checking, but we're a ways from that.
In particular, this patch is correct, but really slow. I want to land this so that the slightly more delicate compile time optimization patches are individually reviewable.
Edit: Forgot to say, this is my first time using memoryssa for anything, so skeptical review is very warranted.
Note that I'm intentionally not preserving MemorySSA even if available. The current update code is *so slow* that it's faster to simply rebuild after SLP is done.
Suggestions on how to make this reasonable fast are welcomed, but I'd strongly prefer to work incrementally and address compile time concerns in following patches.
Without knowing SLPVectorizer details, I think this should be:
s/MemorySSA::InsertionPlace::End/MemorySSA::InsertionPlace::BeforeTerminator.