[PATCH] Add a DecomposeVectors pass

Nadav Rotem nrotem at apple.com
Wed Nov 6 09:54:04 PST 2013


Hi,

 The name of the pass should be "scalarizer" because it scalarizes vectors.  Can you add more tests ?

 Did you try to run it with llvm-stress ? It may expose bugs.

 Do you have plans for scalarizing function calls ? You won't get very far in OpenCL without scalarizing function calls.

 Nadav

Sent from my iPhone

> On Nov 6, 2013, at 9:13, "hfinkel at anl.gov" <hfinkel at anl.gov> wrote:
> 
> 
>  Does this handle vector GEPs? %A = getelementptr <4 x i8*> %ptrs, <4 x i64> %offsets,
> 
> 
> ================
> Comment at: lib/Transforms/Scalar/DecomposeVectors.cpp:286
> @@ +285,3 @@
> +// llvm.mem.parallel_loop_access.
> +void DecomposeVectors::transferMetadata(Instruction *Op,
> +                                        const ValueVector &CV) {
> ----------------
> Pekka Jääskeläinen wrote:
>> I'm not sure if it's safe to blindly transfer  all metadata. Isn't it against the MD principles: if a pass doesn't understand the metadata's purpose, it should drop it, and it should be the safe thing to do. I do not have an example in mind, but it might be safer to white list the known OK MD (which you already list in the function comment)?
> I'd like to second this. Only metadata that is currently understood can be transferred.
> 
> 
> http://llvm-reviews.chandlerc.com/D2112
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list