[PATCH] Refactor code for adding runtime checks in vectorizer.

Michael Zolotukhin mzolotukhin at apple.com
Wed May 27 18:16:15 PDT 2015


Hi Hal,

I split the patch to 4 parts, which hopefully would be easier to understand.

0001 - This is the main patch. Here we do most of the code restructuring (but I tried to keep other changes out of it).
0002 - Move some variable initializations closer to their (single) use. It saves some scrolling when reading the code.
0003 - Use IRBuilder for creating branches. Adjust the test case in which we started to fold a constant ‘icmp’.
0004 - Rename BypassBlock to VectorPreHeader. That’s the change you asked to commit, but it can’t be applied before 0001 patch.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Vectorizer-Refactor-code-for-runtime-checks-generation.patch
Type: application/octet-stream
Size: 9004 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150527/859ecd62/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Move-around-some-initializations.patch
Type: application/octet-stream
Size: 5184 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150527/859ecd62/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Use-IRBuilder.patch
Type: application/octet-stream
Size: 2538 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150527/859ecd62/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-Rename-BypassBlock-to-VectorPreHeader.patch
Type: application/octet-stream
Size: 9833 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150527/859ecd62/attachment-0003.obj>
-------------- next part --------------


Does it look good?

Thanks,
Michael

> On May 27, 2015, at 10:48 AM, Michael Zolotukhin <mzolotukhin at apple.com> wrote:
> 
> Hi Hal,
> 
> I can't commit 's/BypassBlock/VectorPreHeader/' since the original code already has `VectorPH`, and having both `VectorPH` and `VectorPreHeader` simultaneously would be even more confusing. I'll try to remove as many other changes as possible though, and keep only the changes needed for this rename in a separate patch.
> 
> Thanks,
> Michael
> 
> 
> ================
> Comment at: test/Transforms/LoopVectorize/induction.ll:116
> @@ -115,3 +115,1 @@
> ; CHECK-LABEL: max_i32_backedgetaken
> -; CHECK:  %backedge.overflow = icmp eq i32 -1, -1
> -; CHECK:  br i1 %backedge.overflow, label %scalar.ph, label %overflow.checked
> ----------------
> hfinkel wrote:
>> You've removed the check for the icmp. Why?
> I started using IRBuilder, and it folded this expression.
> 
> http://reviews.llvm.org/D9332
> 
> EMAIL PREFERENCES
>  http://reviews.llvm.org/settings/panel/emailpreferences/
> 
> 



More information about the llvm-commits mailing list