[PATCH] PR 16899: Update iterator when SLP vectorizer changes the instructions in the basic block

Nadav Rotem nrotem at apple.com
Mon Aug 19 17:00:59 PDT 2013


LGTM.  Small formatting suggestion:

+          //We would like to start over since some instructions are deleted
+          //and the iterator may become invalid value

Please insert spaces after the comment mark and end the sentence with a period. 

Thanks,
Nadav


On Aug 19, 2013, at 4:53 PM, Yi Jiang <yjiang at apple.com> wrote:

> Hi, 
> 
> Please help to review the patch for PR16899. The reason of crash is that the instructions in the BB could be erased in the loop body and the iterator value is invalid. Thank Joerg for submitting a workaround on this in r188605. While  basically in this patch we would like to update iterator "it" and "e" and start over going though the basic block every time we find that the BB changed, in this case we may find more potential opportunities without invalidate the iterators. To avoid redundant check, We also create a SmallSet to record the instructions we have visited and make sure we do not check them twice.  Also the test case is included. Please see the patch for details and any comments are appreciated. Thank you. 
> 
> Files:
> lib/Transforms/Vectorize/SLPVectorizer.cpp
> test/Transforms/SLPVectorizer/X86/pr16899.ll
> 
> <pr16899.patch>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130819/3f0ccb56/attachment.html>


More information about the llvm-commits mailing list