In this particular situation, the compiler’s auto-vectorization algorithm needs to rely on code inlining to resolve trip counts along with potential data, pointer, and loop dependencies. While the message highlighted in boldface in the report is somewhat obscure to non-compiler savvy developers, it does tell us that the compiler cannot resolve all the dependencies associated with the Interpolate() function. Remark #15344: loop was not vectorized: vector dependence prevents Interpolate(double, const point *) cannot be vectorized Remark #15382: vectorization support: call to function The compiler switch to get these reports on Linux is –qopt-report = 5 –qopt-report-phase = vec and on Windows /Qopt-report = 5 /Qopt-report-phase = vec. The following vector report shows that the critical loop in Figure 22.3 was not vectorized because the compiler could not determine if the call to the Interpolate() function was safe. Most modern compilers are able to apply auto-vectorization algorithms that can decide if a loop can be vectorized, and when appropriate, perform the vectorization. Unoptimized C source code for a linear spline.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |