Feldspar / feldspar-language

The goal of the Feldspar project is to define a high-level language that allows description of high-performance digital signal processing algorithms.
Other
45 stars 3 forks source link

Fix problems with Expand. #535

Closed kffaxen closed 3 years ago

kffaxen commented 3 years ago

This patch fixes a bug in Expand where (array expanded) expressions are erroneously floated past let bindings. It also rectifies a case where an expression is not floated out of a loop because the loop is mistaken as a cheap expression where floating should be disabled. It also avoids unnecessary inlining of let bindings (which can lead to introduction of redundant computations) when no expression is floated out of the let body.