Skip to content

Add option to disable SCC on a module when built for profiling

Motivation

When building a program with profiling, the documentation[1] states that all modules must be compiled with -prof. Since I want minimal runtime overhead, I went down the route of manual SCC annotations. However, some package I'm depending on (regex-tdfa) also ships with manual SCC annotations, that I have no way of disabling with ghc options.

[1] https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/profiling.html#ghc-flag--prof

Proposal

Since it's equally legitimate for the regex-tdfa maintainer to have manual SCC annotations, it seems that we should add a GHC flag like -fno-prof-manual to ignore any manual SCC annotation.

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