preInlineUnconditionally is ok for INLINEABLE
authorSimon Peyton Jones <simonpj@microsoft.com>
Tue, 9 Jan 2018 16:11:44 +0000 (16:11 +0000)
committerSimon Peyton Jones <simonpj@microsoft.com>
Tue, 9 Jan 2018 16:25:53 +0000 (16:25 +0000)
commit1c1e46c1292f4ac69275770ed588401535abec45
tree8fdb9a86f9b180c4b11a327e58e0637a92feedd3
parent66ff794fedf6e81e727dc8f651e63afe6f2a874b
preInlineUnconditionally is ok for INLINEABLE

When debugging Trac #14650, I found a place where we had

    let {-# INLINEABLE f #-}
        f = BIG
    in f 7

but 'f' wasn't getting inlined at its unique call site.
There's a good reason for that with INLINE things, which
should only inline when saturated, but not  for INILNEABLE
things.

This patch narrows the case where preInlineUnconditionally
gives up.  It significantly shortens (and improves) the code
for #14650.
compiler/simplCore/SimplUtils.hs
compiler/simplCore/Simplify.hs