Include closure header size in StgLamLift's estimations
authorSebastian Graf <sebastian.graf@kit.edu>
Thu, 21 Feb 2019 15:02:38 +0000 (16:02 +0100)
committerMarge Bot <ben+marge-bot@smart-cactus.org>
Sun, 24 Feb 2019 03:02:10 +0000 (22:02 -0500)
commitb85068f6843eb0b16ff898e0dfa811fede8e1ca1
tree4387e09cce7b0536822c55576dcc5958ddf2aabb
parent1059e234b04a041291cc422cad715011011724d1
Include closure header size in StgLamLift's estimations

While playing around with late lambda lifting, I realised that
StgLamLift.Analysis doesn't consider the removed closure header in its
allocation estimations.

That's because contrary to what I thought, the total word count returned
by `mkVirtHeapOffsets` doesn't include the size of the closure header.

We just add the header size manually now.
compiler/simplStg/StgLiftLams/Analysis.hs