[PATCH] D22887: [LSV] Use Instruction*s rather than Value*s where possible.
Justin Lebar via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 27 14:52:04 PDT 2016
jlebar created this revision.
jlebar added a reviewer: asbirlea.
jlebar added subscribers: arsenm, llvm-commits.
Herald added a subscriber: mzolotukhin.
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).
https://reviews.llvm.org/D22887
Files:
lib/Transforms/Vectorize/LoadStoreVectorizer.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22887.65809.patch
Type: text/x-patch
Size: 17633 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160727/2a3316ed/attachment.bin>
More information about the llvm-commits
mailing list