[Patch][LoopVectorize]Late evaluation of vectorization requirements

Tyler Nowicki tnowicki at apple.com
Mon Jul 27 15:23:47 PDT 2015


Hi Hal,

Thanks for the review! No worries about the delay.

>> Could I get a review of these patches for cfe and llvm?
> 
> Hi Tyler,
> 
> I'm apologize for the delay. I think this generally looks good, but I don't understand the motivation for introducing the additional FrontendOptions member. Why not just make a subclass of DiagnosticInfoOptimizationRemarkAnalysis that the frontend can handle specially (and detect using the normal isa/dyn_cast mechanism?\

The diagnostic handling code doesn’t use isa or dyn_cast, rather it uses switches to select between different types. I modified the patch to use a subclass rather than a member variable. Let me know what patch you think would work out better?


>> I should have also said in my previous email that I am not thrilled
>> by the need to use O3 in the clang-side test.
> 
> So using -O2 or using -fvectorize does not help?

Using -O1 with -fvectorize seems to work, at least it is a smaller set of passes than O3.

I attached the updated patches. I also noticed that DiagnosticInfoOptimizationBase::classof() was incorrectly implemented. It would need its own diagnostic kind, but that doesn’t make sense because you would never instantiate the base class. I thought it was best just to remove it. See the third patch.

Tyler

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150727/f35fa79e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: LLVM-Late-evaluation-of-vectorization-requirements.patch
Type: application/octet-stream
Size: 22117 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150727/f35fa79e/attachment.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150727/f35fa79e/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Clang-Add-diagnostic-to-append-fp-commute-clang-options-to.patch
Type: application/octet-stream
Size: 4410 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150727/f35fa79e/attachment-0001.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150727/f35fa79e/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: LLVM-Removed-unused-and-broken-classoff-method-in-base-cl.patch
Type: application/octet-stream
Size: 972 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150727/f35fa79e/attachment-0002.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150727/f35fa79e/attachment-0003.html>


More information about the cfe-commits mailing list