[LLVMdev] [PATCH] Add a Scalarize pass

Nadav Rotem nrotem at apple.com
Thu Nov 14 09:16:34 PST 2013


Hi Richard, 

Thanks for working on this. Comments below. 

> I don't understand the basis for the last statement though.  Do you mean
> that you think most cases produce better code if scalarised at the SD stage
> rather than at the IR level?  Could you give an example?

You presented an example that shows that scalarizing vectors allow further optimizations.  But I don’t think that this example represents the kind of problems that we run into in general C++ code.  We currently consider vector legalization a codegen problem.  LLVM is designed this way to handle certain kind of programs. Other users of LLVM (such as OpenCL JITs) do scalarize early in the optimization pipeline because the problem-domain presents lots of vectors that needs to be legalized.  I am very supportive of adding the new scalarization pass, but I don’t want you to add it to the PassManagerBuilder because the PMB is designed for static C compilers, that don’t have this problem.  Are you interested in improving code generation for c++ programs or for programs from another domain ?

Thanks,
Nadav

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20131114/2a74b959/attachment.html>


More information about the llvm-dev mailing list