Deforestation would require a control flow analysis, which is quite a bit more complex than the 40 line optimization I added.
Marc
On Jan 12, 2016, at 10:01 PM, Bradley Lucier lucier@math.purdue.edu wrote:
On Jan 12, 2016, at 9:41 PM, Marc Feeley feeley@iro.umontreal.ca wrote:
I have added a compiler optimization which removes useless definitions in a program. This can be useful to reduce the generated code size of a program by only including the procedures of a custom library that are needed.
Pretty cool.
Maybe you could do something similar with a deforestation pass; that would speed up a lot of codes using short vectors in dense computations.
Brad