[LLVMdev] [llvm] r184698 - Add a flag to defer vectorization into a phase after the inliner and its

Nadav Rotem nrotem at apple.com
Mon Jun 24 14:59:14 PDT 2013


> 
> Just for the record, I have no real expectation that this is a good idea yet... But it's hard to collect numbers without a flag of some kind, and it's also really annoying to craft this flag given the current pass manager, so I figured I would get a skeleton in place that folks could experiment with, and we could keep or delete based on this discussion and any numbers.

I agree. Adding a temporary flag is a good way to allow people to test this change with minimal effort.  This is what we did when Jeffery Yasskin wanted to check the vectorizer a few weeks ago. 

>  
> 
> I see some potential issues:
> 
> * We run a loop pass later again with the associated compile time cost (?)
> 
> All of these share a common thread: the vectorizer somewhat inherently loses information, and thus doing it during the iterative pass manager is very risky as later iterations may be hampered by it.


I agree. The vectorizer is a *lowering* pass, and much like LSR and it loses information.  A few months ago some of us talked about this and came up with a general draft for the ideal pass ordering. 
If I remember correctly the plan was that the second half of the pipe should start with GVN (which currently runs after the loop passes). After that come the loop passes, the Vectorizers (loop vectorization first), and finally LSR, Lower-switch, CGP, etc.  I think that when we discussed this most people argued that the inliner should be before GVN and the loop passes. It would be interesting to see the performance numbers for the new pass order. 

Nadav 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130624/549b3c86/attachment.html>


More information about the llvm-dev mailing list