Demand Analyzer: Do not set OneShot information (second try)
authorJoachim Breitner <mail@joachim-breitner.de>
Fri, 1 Apr 2016 11:11:18 +0000 (13:11 +0200)
committerJoachim Breitner <mail@joachim-breitner.de>
Wed, 6 Apr 2016 20:08:22 +0000 (22:08 +0200)
commit0f58d3484d6bd57fa10bf83f0d9b126884027ebf
tree03173e8f389b9adb555f3c3b9853142fb852b5e9
parent5b986a4de288e2c703c38ee37222a7bf3260cc11
Demand Analyzer: Do not set OneShot information (second try)

as suggested in ticket:11770#comment:1. This code was buggy
(#11770), and the occurrence analyzer does the same job anyways.

This also elaborates the notes in the occurrence analyzer accordingly.

Previously, the worker/wrapper code would go through lengths to transfer
the oneShot annotations from the original function to both the worker
and the wrapper. We now simply transfer the demand on the worker, and
let the subsequent occurrence analyzer push this onto the lambda
binders.

This also requires the occurrence analyzer to do this more reliably.
Previously, it would not hand out OneShot annotatoins to things that
would not `certainly_inline` (and it might not have mattered, as the
Demand Analysis might have handed out the annotations). Now we hand out
one-shot annotations unconditionally.

Differential Revision: https://phabricator.haskell.org/D2085
compiler/basicTypes/Demand.hs
compiler/simplCore/OccurAnal.hs
compiler/specialise/SpecConstr.hs
compiler/stranal/DmdAnal.hs
compiler/stranal/WorkWrap.hs
compiler/stranal/WwLib.hs
testsuite/tests/stranal/should_compile/all.T