Make worker-wrapper optional
ClosedPublic

Authored by christiaanb on Oct 26 2015, 8:56 AM.

Details

Summary

Add -fworker-wrapper flag which enables the worker-wrapper transformation.
It is implied by -O.

The expected users of this flag, which includes myself, are GHC API users.
In my Haskell-to-Hardware compiler, which uses the GHC API, I have seen
no benifits of the worker-wrapper transformation. It does however induce
longer compilation times.

Further discussion can be seen here:
https://mail.haskell.org/pipermail/ghc-devs/2015-October/010096.html

Diff Detail

Repository
rGHC Glasgow Haskell Compiler
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
christiaanb updated this revision to Diff 4672.Oct 26 2015, 8:56 AM
christiaanb retitled this revision from to Make worker-wrapper optional.
christiaanb updated this object.
christiaanb edited the test plan for this revision. (Show Details)
christiaanb added a reviewer: simonpj.
christiaanb updated the Trac tickets for this revision.
simonpj edited edge metadata.Oct 26 2015, 9:02 AM

does -fno-strictnessl turn it off? And does -fstrictness turn it on? It should, I think. (And that needs documenting.)

christiaanb added a comment.EditedOct 26 2015, 11:10 AM

I'm OK with -fstrictness implying -fworker-wrapper. However, it would be an exception to the (currently implemented) rule, when -O -fno-strictness would then also imply -fno-worker-wrapper. See also: http://git.haskell.org/ghc.git/blob/HEAD:/compiler/main/DynFlags.hs#l3601

So should I make an exception to make it so that -fno-strictness implies fno-worker-wrapper?

christiaanb edited edge metadata.
  • -fstrictness implies -fworker-wrapper

So should I make an exception to make it so that -fno-strictness implies fno-worker-wrapper?

I think that makes sense.

christiaanb updated this revision to Diff 4694.Oct 27 2015, 4:33 AM
christiaanb edited edge metadata.
  • -fno-strictness implies -fno-worker-wrapper
austin accepted this revision.Oct 27 2015, 10:18 AM
austin edited edge metadata.

Nice! LGTM.

This revision is now accepted and ready to land.Oct 27 2015, 10:18 AM
This revision was automatically updated to reflect the committed changes.