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

ID 767253
Date 6/24/2024
Public
Document Table of Contents

fsycl-remove-unused-external-funcs

Determines whether unused SYCL_EXTERNAL functions are removed during compilation of SYCL device code.

Syntax

Linux:

-fsycl-remove-unused-external-funcs

-fno-sycl-remove-unused-external-funcs

Windows:

-fsycl-remove-unused-external-funcs

-fno-sycl-remove-unused-external-funcs

Arguments

None

Default

-fsycl-remove-unused-external-funcs

Unused SYCL_EXTERNAL functions are removed during compilation.

Description

This option determines whether unused SYCL_EXTERNAL functions are removed during compilation of SYCL device code.

Specify -fno-sycl-remove-unused-external-funcs to disable this removal. This option may improve performance because it prevents SYCL_EXTERNAL functions from being treated as entry points for SYCL device code.

NOTE:

When using this option, you must also specify option -fsycl.

For information about available SYCL drivers, refer to Invoke the Compiler.

NOTE:

When SYCL offloading is enabled, this option only applies to device-specific compilation.

IDE Equivalent

None

Alternate Options

None

Example

The following shows an example of using this option:

Linux

icpx -g -fsycl -fno-sycl-remove-unused-external-funcs test.cpp

Windows

icpx /Zi -fsycl -fno-sycl-remove-unused-external-funcs test.cpp