[PATCH] D22547: [LSV] Don't move stores across may-load instrs, and loosen restrictions on moving loads.

Justin Lebar via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 19 16:06:42 PDT 2016


jlebar created this revision.
jlebar added a reviewer: asbirlea.
jlebar added subscribers: arsenm, llvm-commits.
Herald added subscribers: mzolotukhin, jholewinski.

Previously we wouldn't move loads/stores across instructions that had
side-effects, where that was defined as may-write may-throw.  But this
is both overly- and underly-restrictive:

 - Stores can't safely be moved across instructions that may load.
 - Loads can be moved across may-throw instructions; it's only may-write
   instructions that must be a barrier.

This patch also adds a DEBUG check that all instructions in our chain
are either loads or stores.

https://reviews.llvm.org/D22547

Files:
  lib/Transforms/Vectorize/LoadStoreVectorizer.cpp
  test/Transforms/LoadStoreVectorizer/NVPTX/merge-across-side-effects.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22547.64589.patch
Type: text/x-patch
Size: 8392 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160719/00507645/attachment.bin>


More information about the llvm-commits mailing list