CPC G06F 8/452 (2013.01) [G06F 8/433 (2013.01)] | 20 Claims |
1. A computer-implemented method comprising:
obtaining program code to be compiled, the program code comprising a loop, and the loop comprising a control-flow having divergent branch conditions; and
compiling the program code to produce compiled code, the compiling comprising:
performing compile-time analysis of the loop based on an assumption of dynamic uniformity, and determining from the compile-time analysis a vectorizable access pattern of the loop; and
vectorizing the loop as part of the compiling the program code, including compiling the loop, the vectorizing comprising:
providing run-time checks in the compiled code, the run-time checks configured for checking for dynamically uniform conditions for vector processing at run-time to control program execution flow based on a result of the checking; and
outputting the compiled code for execution.
|