Changes in Hoopl

Simon Marlow marlowsd at gmail.com
Tue Aug 27 18:06:02 CEST 2013


On 26/08/13 10:00, Jan Stolarek wrote:
>> 1. This adds a new constraint on the dataflow algorithm, namely that it
>> must traverse the blocks in the correct order.
> I don't follow. From what I've seen in the code Hoopl orders blocks using depth-first traversal.
> For backwards analysis it reverses that order. I don't think that proposed changes will affect
> this. What did I miss?

You didn't miss anything.  The new constraint is that forwards analysis 
*must* process blocks in this order, whereas previously it didn't have to.

>> 2. Has anyone tried implementing this change?  I'm slightly concerned
>> that having a difference between forward and backward analyses might
>> lead to divergence in some of the shared parts of the internals of the
>> algorithm.
> If it turns out that forward and backward cases have to diverge to implement this change, will
> that be acceptable? GHC's specialized Hoopl module (compiler/cmm/Hoopl/Dataflow) already has
> separate functions for handling forward and backward analysis.

But they share the core fixpoint algorithm underneath: fixpoint, 
fixpointAnal, and some auxiliary functions.  It's not a big deal.  This 
code is heavily tuned though, so keep an eye on performance.

Cheers,
	Simon






More information about the ghc-devs mailing list