Fix join-point decision
authorSimon Peyton Jones <simonpj@microsoft.com>
Tue, 9 Jan 2018 13:53:09 +0000 (13:53 +0000)
committerSimon Peyton Jones <simonpj@microsoft.com>
Tue, 9 Jan 2018 16:25:53 +0000 (16:25 +0000)
commit66ff794fedf6e81e727dc8f651e63afe6f2a874b
tree4e67e82ff0edf08a14757f4dd7e076fa17059caa
parent30b1fe2f305097955870ada93700eb149a05b4ef
Fix join-point decision

This patch moves the "ok_unfolding" test
   from  CoreOpt.joinPointBinding_maybe
   to    OccurAnal.decideJoinPointHood

Previously the occurrence analyser was deciding to make
something a join point, but the simplifier was reversing
that decision, which made the decision about /other/ bindings
invalid.

Fixes Trac #14650.
compiler/coreSyn/CoreOpt.hs
compiler/simplCore/OccurAnal.hs
testsuite/tests/simplCore/should_compile/T14650.hs [new file with mode: 0644]
testsuite/tests/simplCore/should_compile/all.T