google-research / dex-lang

Research language for array processing in the Haskell/ML family
BSD 3-Clause "New" or "Revised" License
1.58k stars 106 forks source link

Vectorize under loops #1314

Closed axch closed 1 year ago

axch commented 1 year ago

Now if the vectorizer fails to vectorize the outermost loop it encounters, it will recur under it and try to vectorize loops nested underneath. This currently doesn't lead to a search because the "vectorize this loop" pass can't currently handle nested loops, so in practice the result is to attempt vectorization on each innermost loop.