[Patch][LoopVectorize]Late evaluation of vectorization requirements

Tyler Nowicki tnowicki at apple.com
Sun Jun 28 13:17:01 PDT 2015


Improved patch with clang-format.

Tyler


> On Jun 28, 2015, at 1:09 PM, Tyler Nowicki <tnowicki at apple.com> wrote:
> 
> Hi,
> 
> To vectorize fp reductions fast-math is required, but this check is done while identifying the reduction causing a very cryptical analysis message. Also it should be possible to provide a loop hint rather than specifying fast-math for the whole module.
> 
> For float reductions the current analysis message reads:
> - value that could not be identified as reduction is used outside the loop
> 
> This patch moves the verification of fast-math, adds a check for a loop hint, and improves the analysis message.
> 
> The improved message reads:
> - vectorization requires changes in the order of operations, however IEEE 754 floating-point operations are not commutative; allow commutativity by specifying ‘#pragma clang loop vectorize(enable)’ before the loop or by providing the compiler option ‘-ffast-math’
> 
> In the future I will extend this to include pointer aliasing checks and perhaps cost-model checks.
> 
> This patch builds off of my other diagnostic changes that are currently in review (http://reviews.llvm.org/D10714 <http://reviews.llvm.org/D10714>) and “Renaming and Diagnostics for Loop Interleaving". Please make sure to apply patches 0002 and 0003 if you want to try this patch.
> 
> Comments are much appreciated!
> 
> Tyler
> 
> <0004-Late-evaluation-of-vectorization-requirements.patch>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150628/fd056bc0/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-Late-evaluation-of-vectorization-requirements.patch
Type: application/octet-stream
Size: 16772 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150628/fd056bc0/attachment.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150628/fd056bc0/attachment-0001.html>


More information about the llvm-commits mailing list