Guidance to understand the Vectorization framework of Clang

Hi all,

I have been working with Clang for a while now and have worked on a few bug fixes.

I would like to delve further in the area of Vectorization and get familiar with its code.

It would be great if someone could help me by pointing out a few resources which will help

me understand Vectorization?

Which advanced topics in Compiler design would help?

Any particular textbook or research paper which will help me understand Vectorization better?

Any help on this would be highly appreciated!



This book, written by Aart Bik (formerly of Intel, now of Google), while old, is a good place to start:


I second that. Excellent book, very easy to understand. That's how I learnt.


llvmdev@ is a more appropriate list for optimization-related questions.

I'm not sure which techniques the LLVM vectorization code uses, but Optimizing Compilers for Modern Architectures by Allen and Kennedy describes the basic challenges with vectorization well and describes vectorization algorithms for array-based programs. Those techniques, or techniques similar to them, are probably what the LLVM vectorization code uses.

That said, have you taken a look at the LLVM vectorization code? The comments may list books or papers that describe the algorithms that the code implements.

-- John T.

Hi John,

Thanks for the suggestions!

The book seems to be a good place to start.

And the vectorization code, yes, I have started going through the papers!



Thanks Andrey and Renato for your suggestions!

I will get started with the same!

Thanks a lot :slight_smile: