Compile and Profile vectorization

Prerequisites

You must install all the necessary tools and copied the examples/vectorization.* source files as described in Software requirements.

Procedure

  1. Compile the code. To compile the application, run make on the vectorization.makefile file.

    make -f vectorization.makefile
    

    Note

    The makefile auto-detects the compiler set with the CC environment variable to append the compilation flag necessary for generating a compiler report.

    The compilation flags for the compilers supported by the compiler remarks feature are listed in Compiler remarks.

  2. Profile the application with Linaro MAP:

    map ./vectorization
    
  3. Ensure compiler remarks are enabled by using the Compiler remarks ‣ Enabled menu option. Focus on vectorization attempts by unchecking the menu options for other optimization passes, leaving Compiler remarks ‣ loop-vectorize checked.

Notice the three failed vectorization attempts annotating each computational loop in the program.

Next Steps

Optimize the code with vectorization shows you how to optimize the performance of the program by introducing vectorization.