简体   繁体   English

如何查看英特尔ICC编译器上启用了哪些编译选项?

[英]How can I see which compilation options are enabled on Intel ICC compiler?

Is there an equivalent of the following g++ command on icc/icpc intel compiler ? 在icc / icpc intel编译器上是否有以下g ++命令?

?> g++ -march=native -m32 ... -Q --help=target

Which gave me the following output: 这给了我以下输出:

The following options are target specific:
  -m128bit-long-double                  [disabled]
  -m16                                  [disabled]
  -m32                                  [enabled]
  -m3dnow                               [disabled]
  -m3dnowa                              [disabled]
  -m64                                  [enabled]
  -m80387                               [enabled]
  -m8bit-idiv                           [disabled]
  -m96bit-long-double                   [enabled]
  -mabi=                                sysv
  -mabm                                 [disabled]
  -maccumulate-outgoing-args            [disabled]
  -maddress-mode=                       short
  -madx                                 [disabled]
  -maes                                 [disabled]
  -malign-data=                         compat
  -malign-double                        [disabled]
  -malign-functions=                    0
  -malign-jumps=                        0
  -malign-loops=                        0
  -malign-stringops                     [enabled]
  -mandroid                             [disabled]
  -march=                               nehalem
  -masm=                                att
  -mavx                                 [disabled]
  -mavx2                                [disabled]
  -mavx256-split-unaligned-load         [disabled]
  -mavx256-split-unaligned-store        [disabled]
  -mavx512bw                            [disabled]
  -mavx512cd                            [disabled]
  -mavx512dq                            [disabled]
  -mavx512er                            [disabled]
  -mavx512f                             [disabled]
  -mavx512ifma                          [disabled]
  -mavx512pf                            [disabled]
  -mavx512vbmi                          [disabled]
  -mavx512vl                            [disabled]
  -mbionic                              [disabled]
  -mbmi                                 [disabled]
  -mbmi2                                [disabled]
  -mbranch-cost=                        0
  -mcld                                 [disabled]
  -mclflushopt                          [disabled]
  -mclwb                                [disabled]
  -mcmodel=                             32
  -mcpu=                      
  -mcrc32                               [disabled]
  -mcx16                                [enabled]
  -mdispatch-scheduler                  [disabled]
  -mdump-tune-features                  [disabled]
  -mf16c                                [disabled]
  -mfancy-math-387                      [enabled]
  -mfentry                              [enabled]
  -mfma                                 [disabled]
  -mfma4                                [disabled]
  -mforce-drap                          [disabled]
  -mfp-ret-in-387                       [enabled]
  -mfpmath=                             387
  -mfsgsbase                            [disabled]
  -mfused-madd                
  -mfxsr                                [enabled]
  -mglibc                               [enabled]
  -mhard-float                          [enabled]
  -mhle                                 [disabled]
  -mieee-fp                             [enabled]
  -mincoming-stack-boundary=            0
  -minline-all-stringops                [disabled]
  -minline-stringops-dynamically        [disabled]
  -mintel-syntax              
  -mlarge-data-threshold=               0x10000
  -mlong-double-128                     [disabled]
  -mlong-double-64                      [disabled]
  -mlong-double-80                      [enabled]
  -mlwp                                 [disabled]
  -mlzcnt                               [disabled]
  -mmemcpy-strategy=          
  -mmemset-strategy=          
  -mmmx                                 [enabled]
  -mmovbe                               [disabled]
  -mmpx                                 [disabled]
  -mms-bitfields                        [disabled]
  -mmwaitx                              [disabled]
  -mno-align-stringops                  [disabled]
  -mno-default                          [disabled]
  -mno-fancy-math-387                   [disabled]
  -mno-push-args                        [disabled]
  -mno-red-zone                         [disabled]
  -mno-sse4                             [disabled]
  -mnop-mcount                          [disabled]
  -momit-leaf-frame-pointer             [disabled]
  -mpc32                                [disabled]
  -mpc64                                [disabled]
  -mpc80                                [disabled]
  -mpclmul                              [disabled]
  -mpcommit                             [disabled]
  -mpopcnt                              [enabled]
  -mprefer-avx128                       [disabled]
  -mpreferred-stack-boundary=           0
  -mprefetchwt1                         [disabled]
  -mprfchw                              [disabled]
  -mpush-args                           [enabled]
  -mrdrnd                               [disabled]
  -mrdseed                              [disabled]
  -mrecip                               [disabled]
  -mrecip=                    
  -mrecord-mcount                       [disabled]
  -mred-zone                            [enabled]
  -mregparm=                            0
  -mrtd                                 [disabled]
  -mrtm                                 [disabled]
  -msahf                                [enabled]
  -msha                                 [disabled]
  -mskip-rax-setup                      [disabled]
  -msoft-float                          [disabled]
  -msse                                 [enabled]
  -msse2                                [enabled]
  -msse2avx                             [disabled]
  -msse3                                [enabled]
  -msse4                                [enabled]
  -msse4.1                              [enabled]
  -msse4.2                              [enabled]
  -msse4a                               [disabled]
  -msse5                      
  -msseregparm                          [disabled]
  -mssse3                               [enabled]
  -mstack-arg-probe                     [disabled]
  -mstack-protector-guard=              tls
  -mstackrealign                        [enabled]
  -mstringop-strategy=                  [default]
  -mtbm                                 [disabled]
  -mtls-dialect=                        gnu
  -mtls-direct-seg-refs                 [enabled]
  -mtune-ctrl=                
  -mtune=                               nehalem
  -muclibc                              [disabled]
  -mveclibabi=                          [default]
  -mvect8-ret-in-mem                    [disabled]
  -mvzeroupper                          [disabled]
  -mx32                                 [disabled]
  -mxop                                 [disabled]
  -mxsave                               [disabled]
  -mxsavec                              [disabled]
  -mxsaveopt                            [disabled]
  -mxsaves                              [disabled]

  Known assembler dialects (for use with the -masm-dialect= option):
    att intel

  Known ABIs (for use with the -mabi= option):
    ms sysv

  Known code models (for use with the -mcmodel= option):
    32 kernel large medium small

  Valid arguments to -mfpmath=:
    387 387+sse 387,sse both sse sse+387 sse,387

  Known data alignment choices (for use with the -malign-data= option):
    abi cacheline compat

  Known vectorization library ABIs (for use with the -mveclibabi= option):
    acml svml

  Known address mode (for use with the -maddress-mode= option):
    long short

  Known stack protector guard (for use with the -mstack-protector-guard= option):
    global tls

  Valid arguments to -mstringop-strategy=:
    byte_loop libcall loop rep_4byte rep_8byte rep_byte unrolled_loop vector_loop

  Known TLS dialects (for use with the -mtls-dialect= option):
    gnu gnu2

This gcc/g++ option give me a lot of usefull information like: m32 and msse4.2 is enabled , march is nehalem , mfpmath is 387 , masm is att , ect... 这个gcc / g ++选项给了我很多有用的信息,如: m32msse4.2 enabledmarchnehalemmfpmath387masmatt ,等等...

I am really interested to know if an option like that exist for Intel icc/icpc compiler. 我真的很想知道英特尔icc / icpc编译器是否存在类似的选项。

Thanks. 谢谢。

You can try as follows: 你可以尝试如下:

icpc    -dM -E -x c++ *.c

The former combined with the options: 前者结合选项:

-vec-report[=n]
           control amount of vectorizer diagnostic information
             n=0    no diagnostic information
             n=1    indicate vectorized loops (DEFAULT when enabled)
             n=2    indicate vectorized/non-vectorized loops
             n=3    indicate vectorized/non-vectorized loops and prohibiting
                    data dependence information
             n=4    indicate non-vectorized loops
             n=5    indicate non-vectorized loops and prohibiting data
                    dependence information
             n=6    indicate vectorized/non-vectorized loops with greater
                    details and prohibiting data dependence information
             n=7    indicate vector code quality message ids and data values
                    for vectorized loops

 -qopt-report[=n]
           generate an optimization report. Default destination is
           <target>.optrpt.  Levels of 0 - 5 are valid.
           Please see documentation for additional details of
           information provided by phase per level.
             0   disable optimization report output
             2   DEFAULT when enabled

 -qopt-report-file=[stdout | stderr | <file>]
           specify the filename or output stream for the generated report

 -qopt-report-stdout
           specify the generated report should be directed to stdout

 -qopt-report-per-object
           specify the generated report should be directed to a .optrpt file
           in the output directory (DEFAULT when another destination for the
    report is not specified)

 -qopt-report-phase=<phase>[,<phase>,...]
           specify one or more phases that reports are generated against

 -qopt-report-routine=<name>[,<name>,...]
           restrict the report to routines containing the given name

 -qopt-report-filter=<string>
           restricts the opt-report to specific files, routines or line
           number ranges. Refer to the documentation for the specific
           syntax of parameter string.

 -qopt-report-format=[text|vs]
           specify the output format to be used for the opt-report as either
           plain text or a format for use in the Microsoft* Visual Studio IDE

 -q[no-]opt-report-embed
           When enabled, if an assembly file is being generated, special loop
           info annotations will be emitted in the assembly file.  If an object
           file/executable is being generated, these will be emitted into the
           object file/executable for use by the Intel VTune Amplifier
           application. Automatically enabled when symbolic debug information
           is enabled.

 -qopt-report-help
           display the optimization phases available for reporting

 -qopt-report-names=<keyword>
           Specifies whether mangled or unmangled names should appear in the
           optimization report.
             mangled   - use mangled names
             unmangled - use unmangled names (DEFAULT)

 -tcheck [mode]
           enable analysis of threaded applications (requires Intel(R) Thread
           Checker; cannot be used with compiler alone)
             tci - instruments a program to perform a thread-count-independent
                   analysis
    tcd - instruments a program to perform a thread-count-dependent
                   analysis (DEFAULT when mode is not used)
             api - instruments a program at the api-imports level

 -tcollect[=<lib>]
           inserts instrumentation probes calling the Intel(R) Trace Collector
           API.  The library -l<lib> is linked in the default being -lVT
           (requires Intel(R) Trace Collector)

 -tcollect-filter file
           Enable or disable the instrumentation of specified functions. 
           (requires Intel(R) Trace Collector)

will provide you enought information. 将为您提供信息。 I hope that this helps. 我希望这个对你有用。

Intel Compiler supports -help compiler option and provides an option to filter the output based on categories as shown below: 英特尔编译器支持-help编译器选项,并提供基于类别过滤输出的选项,如下所示:

icpc -help
.
.
-help [category]   print full or category help message

 Valid categories include
   advanced        - Advanced Optimizations
   codegen         - Code Generation
   compatibility   - Compatibility
   component       - Component Control
   data            - Data
   deprecated      - Deprecated Options
   diagnostics     - Compiler Diagnostics
   float           - Floating Point
   help            - Help
   inline          - Inlining
   ipo             - Interprocedural Optimization (IPO)
   language        - Language
   link            - Linking/Linker
   misc            - Miscellaneous
   opt             - Optimization
   output          - Output
   pgo             - Profile Guided Optimization (PGO)
   preproc         - Preprocessor
   reports         - Optimization Reports
   openmp          - OpenMP and Parallel Processing

For this specific request from you, you can get options in codegen category. 对于您的此特定请求,您可以获得codegen类别中的选项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何通过Intel C ++编译器(ICC)在三种方法上使用SFINAE? - How to use SFINAE on three methods with Intel C++ Compiler (ICC)? 使用gcc时,如何使用由Intel编译器编译的库? - How can I use libraries which were compiled by Intel compiler, when I'm using gcc? 如何使用Visual Studio 2012和Intel Compiler XE 2013构建可在Windows XP中运行的可执行文件? - How can I build executables which can be run in Windows XP using Visual Studio 2012 and Intel Compiler XE 2013? 在Visual Studio中进行调试-我可以看到Intel Compiler库代码吗? - Debugging in Visual Studio- can I see the Intel Compiler library code? 英特尔c ++编译器,ICC,似乎陷入了SSE / AVX seetings - Intel c++ compiler, ICC, seems to ingnore SSE/AVX seetings 英特尔编译器(ICC)无法自动向量化内部循环(矩阵乘法) - Intel compiler (ICC) unable to auto vectorize inner loop (matrix multiplication) 如何在 Intel ICC 中启用 long double - How to enable long double in Intel ICC 如何使用英特尔编译器和英特尔MPI安装Boost? - how do i install boost with intel compiler and intel mpi? 我如何才能真正使用 cmake 期间设置的编译选项? - How can I actually use the compilation options set during cmake? linux上的英特尔编译器的特征库编译错误 - Eigen library compilation error with intel compiler on linux
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM