Loop optimisation with identical counters

Sebastian Fischer fischer at nii.ac.jp
Fri Nov 5 22:27:27 EDT 2010


On Nov 6, 2010, at 8:22 AM, David Peixotto wrote:

> To summarize, I found that it is possible to get LLVM to do this
> transformation through a combination of tail-call elimination,  
> inlining,
> induction variable optimization, and global value numbering.

Interesting. This approach requires `f` to be inlined into its call  
site in order to eliminate the redundant argument. This is different  
from the proposal to provide a specialized version of `f` (where the  
arguments are combined) which could be reused at different call sites.

How many call sites with identical arguments are there in the  
generated code that triggered this discussion and in the stream fusion  
code that would benefit from this optimization?

Sebastian


More information about the Glasgow-haskell-users mailing list