Don't inline functions with RULES too early
authorSimon Peyton Jones <simonpj@microsoft.com>
Mon, 30 Jul 2018 12:43:56 +0000 (13:43 +0100)
committerSimon Peyton Jones <simonpj@microsoft.com>
Tue, 31 Jul 2018 12:19:43 +0000 (13:19 +0100)
commit2110738b280543698407924a16ac92b6d804dc36
treef5a5bbb377b4554e99eae18a146894908d88f9d5
parent56590db07a776ce81eb89d4a4d86bd0f953fb44e
Don't inline functions with RULES too early

Trac #15445 showed that a function with an automatically
generated specialisation RULE coudl be inlined before the
RULE had a chance to fire.

This patch attaches a NOINLINE[2] activation to the Id, to
stop this happening.
compiler/basicTypes/BasicTypes.hs
compiler/basicTypes/MkId.hs
compiler/specialise/Rules.hs
compiler/stranal/WorkWrap.hs
testsuite/tests/simplCore/should_compile/T15445.hs [new file with mode: 0644]
testsuite/tests/simplCore/should_compile/T15445.stderr [new file with mode: 0644]
testsuite/tests/simplCore/should_compile/T15445a.hs [new file with mode: 0644]
testsuite/tests/simplCore/should_compile/all.T