2018 LLVM Developers’ Meeting: K. Mitropoulou “VecClone Pass: Function Vectorization via LoopVec...”
4Likes
473Views
2018Nov 28
http://llvm.org/devmtg/2018-10/ — VecClone Pass: Function Vectorization via LoopVectorizer - Konstantina Mitropoulou Slides: — We currently have three vectorizers in the LLVM trunk: LoopVectorizer, SLPVectorizer, and LoadStoreVectorizer. In this talk, we present how we are avoiding to add a fourth vectorizer for function vectorization. Vectorizing a function is necessary when a programmer writes a function that operates on a single element (or work item) and wants to execute it on multiple elements (or work items), through SIMD execution units. Compilation of OpenMP declare simd functions and OpenCL kernels, for SIMD targets, fits in this profile. A naïve approach is to write a purpose built vectorizer that is tuned to vectorize functions. However, since vectorizer is a complicated optimization pass which consists of many components including optimization, cost model and code generation, both the development and the maintenance are big headaches. Therefore, since there are great similarities between vectorizing a loop and vectorizing a function, we decided to use the LoopVectorizer to vectorize functions. In this talk, we present how OpenMP and OpenCL kernel functions are transformed in such a way that they can be vectorized through the standard LoopVectorizer. We call this optimization pass VecClone. — Videos Filmed & Edited by Bash Films: http://www.BashFilms.com

LLVM

16.2K subscribers