Skip to content

Change CONSTANT_FOLDED from NOINLINE to INLINE[0]

It's a shame that we mark Integer ops from GHC.Num.Integer as NOINLINE to allow constant-folding in GHC.Core.Opt.ConstantFold. They should be marked INLINE[0] instead:

  1. To delay their inlining long enough for the constant-folding rules defined in GHC.Core.Opt.ConstantFold to fire
  2. To inline them late, so that the boxes they allocate are often fused away.

Here is a history of motivation:

Edited by Sylvain Henry
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information