1

In the gcc compiler I can specify the arguments -Q --help=optimizers to get a list of the enabled/disabled optimization flags at the current O level. Is there a similar command for the intel icx compiler? If not, is there a resource that lists the optimization flags by O0, O1, O2, and O3?

I can't seem to find anything on it.

1201ProgramAlarm
  • 32,384
  • 7
  • 42
  • 56
nreh
  • 476
  • 8
  • 13
  • @wallyk that link's seems to link to a non existent page :/ – nreh Sep 12 '21 at 00:17
  • That's weird. It should be this: https://software.intel.com/content/www/us/en/develop/documentation/oneapi-dpcpp-cpp-compiler-dev-guide-and-reference/top/compilation.html – wallyk Sep 12 '21 at 02:20

2 Answers2

3

Please visit the link below which has the list of optimization flags and their significance which may help you.

https://software.intel.com/content/www/us/en/develop/documentation/cpp-compiler-developer-guide-and-reference/top/compiler-reference/compiler-options/compiler-option-details/optimization-options/o.html

Besides this, to get list of optimization flags: 

  1. -fsave-optimization-record= "format" Generates an optimization record file in a specific format.
  2. -fsave-optimization-record Generates a YAML optimization record file. In addition, you can try "icx --help | grep optimization" and check for the option which suits best for your purpose
iamzeid
  • 104
  • 1
  • 2
  • 18
  • Link changed. Go here: https://www.intel.com/content/www/us/en/develop/documentation/cpp-compiler-developer-guide-and-reference/top/compiler-reference/compiler-options.html and click 'Optimization options' on the left menu. – Ofek Shilon May 24 '22 at 12:11
  • Also, I believe `fsave-optimization-record` was implemented in clang and later very partially in gcc - but never in intel. And it never gave a list of optimization flags, for any compiler. – Ofek Shilon May 24 '22 at 12:16
0

The link above is for the new non-Clang-based Intel compiler icc (they refer to it as classic). To get compiler options for icx, have a look here: https://www.intel.com/content/www/us/en/develop/documentation/oneapi-dpcpp-cpp-compiler-dev-guide-and-reference/top/compiler-reference/compiler-options/alphabetical-list-of-compiler-options.html

Oichlober
  • 31
  • 3