When a gcc application is compiled in release mode (O3) what instruction set extensions are used?

StackOverflow https://stackoverflow.com/questions/18616902

문제

When a GNU C / C++ application is compiled in vanilla release mode (O3) what instruction set extensions are used?

How do the extended instruction set come into play? Are multiple code blocks included in the resulting executable and then used if available?

도움이 되었습니까?

해결책

O3 will only use instructions that are specified when compiling (default specified when building toolchain, if none of switches explained here is specified). It will just try to optimize more aggresively (as specified here). Most optimizations are actually done in compiler "middle" end before code is even converted into target machine specific form.

So you can combine any -O with any instruction set extension by using those two groups of switches.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top