Commits

Arnold Schwaighofer committed 04ca5e128ec
ABCOpts: Add bounds check hoisting of induction identity accesses We can now hoist the check in: for (i = start; i != end; ++i) a[i] = ... or for i in start ..< end a[i] = ... We will also hoist invariant checks as in k = for i in start ..< end a[k] = ... We will also hoists the overflow check for "++i" out of the loop. The only thing blocking vectorization of memset loops is the fact that we are overflow checking the type size muliplication of array accesses. "a[i]" is translated to "a + sizeof(T) * i" and this multiplication is still overflow checked. We can remove bounds checks in PrimeNum, XorLoop, Hash, MemSet, NBody, Walsh. Memset , 2371.00 , 1180.00 , 1179.00 , 99.9% XorLoop , 1403.00 , 1255.00 , 149.00 , 11.9% rdar://14757945 Swift SVN r21182