Skip to content

Per-function code-generation options

On ghc-devs Ed Kmett has asked for some way to more precisely specify code generation options (e.g. should AVX be used?).

This idea has taken a few different shapes in the thread, but I suspect that the most sensible approach is add something like a TARGET pragma, which the user could attach to a top-level binding. Since the interactions with inlining are non-trivial, I suspect you would want to require that this only be applied to NOINLINE bindings.

Trac metadata
Trac field Value
Version 8.0.1
Type FeatureRequest
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information