Opened 6 years ago

Last modified 5 years ago

#8404 new feature request

Default to turning on architecture specific optimizations in the codegen

Reported by: tibbe Owned by:
Priority: normal Milestone:
Component: Compiler (NCG) Version: 7.6.3
Keywords: Cc: simonmar
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Runtime performance bug Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


LLVM defaults to turning on whatever architecture specific optimizations are supported on the user's machine (e.g. -msse4.2). This makes programs run faster during testing and generally gives users a better perception of the compiler. If the user wants to compile for some more portable subset (e.g. when cross-compiling) he/she adds -march, -mcpu, etc flags on the command line.

To implement this we'd have to detect what CPU type is used etc and initialize our DynFlags based on that.

Change History (2)

comment:1 Changed 6 years ago by tibbe

LLVM documentation about their flags and autodetection behavior here:

comment:2 Changed 5 years ago by thomie

Cc: simonmar added
Component: CompilerCompiler (NCG)
Type: bugfeature request
Type of failure: None/UnknownRuntime performance bug
Note: See TracTickets for help on using tickets.