Skip to content
Snippets Groups Projects
Commit b92479f9 authored by Sebastian Graf's avatar Sebastian Graf Committed by Marge Bot
Browse files

Inliner: Regard LitRubbish as TrivArg and not ConLike

Part of fixing #19766 required the emission of `LitRubbish` as absent filler in
places where we used `absentError` before. In WWRec we have the situation that
such bindings occur in the argument to functions. With `LitRubbish` we inlined
those functions, because

 1. The absent binding was regarded as ConLike. So I fixed `exprIsHNFLike` to
    respond `False` to `LitRubbish`.
 2. The other source of inlining was that after inlining such an absent
    binding, `LitRubbish` itself was regarded `ValueArg` by `interestingArg`,
    leading to more inlining. It now responds `TrivArg` to `LitRubbish`.

Fixes #20035.

There's one slight 1.6% ghc/alloc regression left in T15164 that is due to an
additional specialisation `$s$cget`. I've no idea why that happens; the Core
output before is identical and has the call site that we specialise for.

Metric Decrease:
    WWRec
parent e69d070b
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment