摘要 |
A method for optimizing a loop in a computer program. The loop contains at least a first statement that uses a variable. The method includes inserting a second statement that loads the variable. The second statement is inserted prior to the loop. The method also includes inserting a third statement that (i) checks whether the variable has been written to at any point between the second statement and the third statement and if and only if the variable has been written to, then loading the variable.
|