Fix #1709: do not expose the worker for a loop-breaker
authorsimonpj@microsoft.com <unknown>
Tue, 16 Oct 2007 13:18:40 +0000 (13:18 +0000)
committersimonpj@microsoft.com <unknown>
Tue, 16 Oct 2007 13:18:40 +0000 (13:18 +0000)
commit592269dfc6ed59c1a044c18542b1954ce767c9c0
tree478556e5e8f0b161dc21fec1f626b16056a51d15
parent56a39804b7ba971a170eff8c129882460e1ba24b
Fix #1709: do not expose the worker for a loop-breaker

The massive 'Uni' program produced a situation in which a function that
had a worker/wrapper split was chosen as a loop breaker.  If the worker
is exposed in the interface file, then an importing module may go into
an inlining loop: see comments on TidyPgm.tidyWorker.

This patch fixes the inlining bug.  The code that gives rise to this
bizarre case is still not good (it's a bunch of implication constraints
and we are choosing a bad loop breaker) but the first thing is to fix the
bug.

It's rather hard to produce a test case!

Please merge to the 6.8 branch.
compiler/main/TidyPgm.lhs