hoopl questions

Jan Stolarek jan.stolarek at p.lodz.pl
Tue Oct 22 07:48:53 UTC 2013


Hi Brett,

> 1) There doesn't seem to be a "run" function or a way to create FuelMonads.
>  I found runWithFuel, getFuel and setFuel, but they are in the hidden
> Compiler.Hoopl.Fuel module.  This is ghc version 7.6.3 and hoopl version
> 3.9.0
I was confused the same way you are now:
http://www.haskell.org/pipermail/ghc-devs/2013-July/001777.html
There is no way to use fuel at the moment. You could try to re-enable it on your own.

Regarding the examples you're asking - I'm not aware of any. The best you can do is look at 
existing Hoopl code and try to learn from it.

As for the transformations you're trying to implement. You are aware that they are already 
implemented in GHC but without Hoopl?

Janek

Dnia poniedziałek, 21 października 2013, Brett Letner napisał:
> Hi all -
>
> Some (beginner) hoopl questions:
>
> 1) There doesn't seem to be a "run" function or a way to create FuelMonads.
>  I found runWithFuel, getFuel and setFuel, but they are in the hidden
> Compiler.Hoopl.Fuel module.  This is ghc version 7.6.3 and hoopl version
> 3.9.0
>
> 2) Are there any examples that show "inlining" empty graphs/blocks?
>
> Suppose I have a C C graph that looks like this:
>
> label 12:
> goto 13;
>
> I'd like to rewrite all the occurrences of label 12 to label 13 and
> eliminate the label 12 graph (from what I've seen this will happen
> automatically once all the label 12 references are gone).
>
> 3) How about inlining single use graphs?
>
> Suppose I have two C C graphs that look like this:
>
> label 15:
> <nodes O O>
> goto 16;
>
> label 16:
> <nodes O O>
> <node O C>
>
> If the only reference to label 16 is from the label 15 graph, then I'd like
> to rewrite it as:
> label 15:
> <nodes O O from label 15>
> <nodes O O from label 16>
> <node O C from label 16>
>
> Thanks,
> Brett




More information about the ghc-devs mailing list