Patent ID: 7366880
Filing Date: 2008-04-29
Classification: G06F

Abstract:
1. A method that predicts a result produced by a section of code in order to support speculative program execution, the section of code including a plurality of program instructions, the method comprising: executing the section of code within a program using a head thread, wherein executing the section of code produces the result; before the head thread produces the result, generating a predicted result to be used in place of the result; allowing the speculative thread to speculatively execute subsequent code within the program using the predicted result, wherein the subsequent code follows the section of code in an execution stream of the program; during a write operation to a memory element by the head thread, determining whether to roll back the speculative thread; and after the head thread finishes executing the section of code, determining if a difference between the predicted result and the result generated by the head thread affected execution of the speculative thread by: if the difference affected execution of the speculative thread, executing the subsequent code again using the result generated by the head thread; and if the difference did not affect execution of the speculative thread, performing a join operation to merge state associated with the speculative thread with state associated with the head thread.