Patent ID: 8291197

Claim:
A computer-implemented method, comprising: analyzing program instructions comprising a loop to identify one or more load operations in the body of each loop iteration that are data dependent on store operations in the body of another loop iteration; transforming the program instructions to produce transformed program instructions such that two or more loop iterations of the transformed program instructions are executable in parallel, wherein said transforming comprises: adding one or more additional program instructions to the program instructions that are to be executed prior to executing the body of the loop, wherein the additional program instructions implement a thread initialization stage; and replacing, in the body of the loop, a load instruction corresponding to an identified load operation with an alternate load instruction; wherein specification of the one or more additional program instructions is dependent on the one or more load operations identified by said analyzing; partitioning loop iterations of the transformed program instructions into two or more threads, wherein each thread comprises one or more loop iterations and is configured for concurrent execution; and for each of said two or more threads: dispatching the thread for execution on a processor or strand resource; speculatively executing a loop iteration in the thread, wherein said speculatively executing the loop iteration comprises executing the one or more additional program instructions prior to executing the body of the loop iteration and executing the body of the loop iteration; determining whether an identified load operation in the loop iteration is dependent on results of a store operation in a different thread that has not yet completed execution, wherein said determining is dependent on results of said executing the one or more additional program instructions; and validating preliminary results of said speculatively executing the loop iteration if no load operations in the loop iteration are dependent on results of a store operation in a different thread that has not yet completed execution; wherein the alternate load instruction is executable to: prior to the identified load operation being performed, perform said determining whether the identified load operation of the thread is dependent on results of a store operation of a different thread that has not yet completed execution; and subsequent to said determining whether the identified load operation of the thread is dependent on results of a store operation of a different thread that has not yet completed execution, unconditionally perform the identified load operation.