[LLVMdev] RFC: Should we have (something like) -extra-vectorizer-passes in -O2?

Arnold Schwaighofer aschwaighofer at apple.com
Tue Oct 14 11:46:10 PDT 2014


> On Oct 14, 2014, at 11:31 AM, Nadav Rotem <nrotem at apple.com> wrote:
> 
> 
>> On Oct 14, 2014, at 11:21 AM, Andrew Trick <atrick at apple.com <mailto:atrick at apple.com>> wrote:
>> 
>>> I actually agree with you in principle, but I would rather run the pass now (and avoid hacks downstream to essentially do CSE in the backend) than hold up progress on the hope of advanced on-demand CSE layers being added to the vectorizers. I don't know of anyone actually working on that, and so I'm somewhat concerned it will never materialize.
> 
> The SLP vectorizer already has a built-in CSE.  The Loop vectorizer does not need a CSE AFAIK, but it does need InstCombine to cleanup the code that we generate for induction variables and scatter/gather. 

The loop vectorizer also performs CSE internally. There is an interaction between CSE and instcombine (induction variables if I remember correctly) where you want to run CSE followed by instcombine - (maybe even followed by CSE again - not totally positive but I think this was the case) that we would not cleanup otherwise.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20141014/785ed51e/attachment.html>


More information about the llvm-dev mailing list