A method for identifying and eliminating partially redundant array bounds checks in DVM JIT compliers is disclosed. The method employs an algorithm that is capable of eliminating array bound checks for complex indices that comprise of a combination of iterators, loop invariants and constants. The method identifies array references that may be hoisted outside the loop for optimization of the checks. Further, a valid expression tree table is constructed for the reference and the partially redundant checks are eliminated by hoisting newly generated check out of the loop. The method optimizes the checks and thereby increases speed of execution.
展开▼