摘要 |
A method for the vectorization of software applications where source code dependencies are expressed in ways that extend a compiler's ability to vectorize otherwise scalar functions. When compiling a called function, which may be a library function, a compiler may identify dependencies of the called function on variables other than parameters passed to the called function, e.g. static variables or global variables. The compiler records these dependencies in a dependency database, e.g. in a dependency file. The dependency file indicates whether the called function only reads a data item, only writes a data item or both reads and writes a data item. Later, when compiling a calling function that calls the called function, the same (or another) compiler may reference the previously-identified dependencies and use them to determine whether and how to vectorize the calling function. In particular, these techniques may facilitate the vectorization of non-leaf loops, i.e. those that make calls to called functions. Because non-leaf loops are relatively common, the techniques described can increase the amount of vectorization that can be applied to many applications. |