libmesh
libmesh copied to clipboard
Make opt more optimized
Some things we definitely want to do:
-
-O3
Some things we might want to do:
-
march
-
mtune
Just in case you are not already aware of it, we have --enable-march
which calls AX_GCC_ARCHFLAG
(m4/ax_gcc_archflag.m4) to try and figure out the right flag to use for the current CPU. That m4 file should definitely be updated though, I don't think it has been for a while.
Nice. Thanks for the heads up
https://www.gnu.org/software/autoconf-archive/ax_gcc_archflag.html doesn't show any updates since the version you pulled. I'm surprised it doesn't seem to have a simple march=native
fallback, though; gcc can try to autodetect available instruction sets even on processors newer than it is.
Maybe march=native
is too risky for most users? I've run into a case where I had to rebuild a software stack on an older computer in a mixed network because some eager developer had decided to use march=native by default and thus newer-computer-built executables were crashing when run on older computers.