[cfe-dev] How would I determine -march=<type> on the fly
David Barto via cfe-dev
cfe-dev at lists.llvm.org
Sun May 6 09:25:55 PDT 2018
The system I work with generates code and then compiles it into a shared library
to execute. Currently we choose to set -march=core2 which is easy enough but
quite silly because we don’t get any machine specific optimizations that could get
better execution times.
I can’t google how to find the appropriate arch type for the compiler. If I could do
that then I could check the hardware (somehow) and match it to the proper -march
tag, and have the resulting compile line include the target hardware thus generating
better performant code.
Anyone know how that could be done?
David
David Barto
barto at cambridgesemantics.com
Sometimes, my best code does nothing. Most of the rest of it has bugs.
More information about the cfe-dev
mailing list