Skip to content

profiling: Don't insert late cost centre for exprIsWorkFree RHS

Matthew Pickering requested to merge wip/late-cost-expr-is-work into master

We noticed that enabling last cost centres lead to significantly increasing compilation time and size of object files.

Further investigation led to us observing that adding a cost centre to very simple definitions led to them all getting complicated entry code which is normally emitted for simple definitions.

A simple way to mostly stop this happening is to only add late cost centres to definitions which will contribute some cost to the profile. This significanly reduces the size of the resulting object files (4.2G -> 3.1G for GHC tree !10930)

Fixes #24103

Merge request reports