Intel® oneAPI DPC++/C++ Compiler Developer Guide and Reference

ID 767253
Date 6/24/2024
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

ftarget-compile-fast

Tells the compiler to perform less aggressive optimizations to reduce compilation time at the expense of generating less optimal target code. This is an experimental feature.

Syntax

Linux:

-ftarget-compile-fast

Windows:

/ftarget-compile-fast

Arguments

None

Default

OFF

Less aggressive optimizations to reduce compilation time are not performed.

Description

This option tells the compiler to perform less aggressive optimizations to reduce compilation time at the expense of generating less optimal target code. This is an experimental feature.

It may be useful to specify this option in these cases:

  • When you are in a development period and want a fast turnaround time while testing

  • When you are specifying options O2 or O3 for a product with Just-in-Time (JIT) compilation, and both compile-time and execution performance are important

This option is not recommended when you are specifying options O2 or O3 for a product with Ahead-of-Time (AOT) compilation, where long but one-time compilation may be tolerable in order to achieve the best performance.

NOTE:

This compiler option is not recommended if you plan to ship object files as part of a final product.

NOTE:

This option only applies to host compilation. When offloading is enabled, it does not impact device-specific compilation.

IDE Equivalent

None

Alternate Options

None

Examples

The following shows examples of using this option:

Linux

icx -fsycl -fsycl-targets=spir64_gen -Xsycl-target-backend=spir64_gen "-device skl" test.cpp -ftarget-compile-fast foo.cpp -o:a.out
icpx -fiopenmp -fopenmp-targets=spir64_gen -Xsycl-target-backend=spir64_gen "-device skl" -ftarget-compile-fast foo.cpp -o a.out

Windows

icx /Qiopenmp /Qopenmp-targets:spir64_gen -Xopenmp-target-backend=spir64_gen "-device skl" /ftarget-compile-fast foo.cpp /Fo:a.out