[LSV] Use Instruction*s rather than Value*s where possible.
Summary: Given the crash in D22878, this patch converts the load/store vectorizer to use explicit Instruction*s wherever possible. This is an overall simplification and should be an improvement in safety, as we have fewer naked cast<>s, and now where we use Value*, we really mean something different from Instruction*. This patch also gets rid of some cast<>s around Value*s returned by Builder. Given that Builder constant-folds everything, we can't assume much about what we get out of it. One downside of this patch is that we have to copy our chain before calling propagateMetadata. But I don't think this is a big deal, as our chains are very small (usually 2 or 4 elems). Reviewers: asbirlea Subscribers: mzolotukhin, llvm-commits, arsenm Differential Revision: https://reviews.llvm.org/D22887 llvm-svn: 276938
Loading
Please sign in to comment