google-research / dex-lang

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

Case of case and other optimizations in the inliner #1294

Closed axch closed 1 year ago

axch commented 1 year ago

Augment the inliner to do several standard optimizations as it goes:

Doing this in-pass in the inliner is generally recommended because these optimizations can chain with each other, and are basically always beneficial, so getting as many of them done per traversal as possible is desirable.