gcc optimization flags for Xeon?

后端 未结 6 953
猫巷女王i
猫巷女王i 2020-12-12 22:22

I\'d want your input which gcc compiler flags to use when optimizing for Xeons?

There\'s no \'xeon\' in mtune or march so which is the closest match?

6条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-12 23:13

    The following will show you all the flags your processor supports:

    cat /proc/cpuinfo | grep flags | head -1
    

    Best way to determine what optimizations exist for your proccesor specifically depends not only on the model, but what version of gcc you have on the system you are compiling. Make sure to check what version of gcc you have, and cross reference on their documentation:

    https://gcc.gnu.org/onlinedocs

    i.e. I have Slackware 14.1 x64, which has gcc 4.8.2, so I would go here:

    https://gcc.gnu.org/onlinedocs/gcc-4.8.2/gcc/i386-and-x86-64-Options.html#i386-and-x86-64-Options

提交回复
热议问题