E.1 OpenCL 1.2 compiler options

OpenCL 1.2 adds options for offline and online compilation.

The following options are added in OpenCL 1.2:
Online compilation
In OpenCL 1.2, you can compile and link separate OpenCL files during online compilation. Any compiler flags you specify for compilation are used for frontend and middle-level optimizations. These flags are discarded during backend compilation and linking. You can also specify a limited list of compiler flags during the linking phase. These flags are forwarded to the compiler backend after linking.
You can supply different flags during the compilation of different modules because they only affect the frontend and mid-level transformation of separate modules. Later in the build process, the commonly linked module overrides these flags with the flags passed during the linking phase, to the overall linking program. It is safe to mix modules that are compiled separately with different various options, because only a limited set of linking flags are applied to the overall program.
The full set of flags can only affect early compilation steps. For example, if -cl-opt-disable is passed, it only disables the early optimization phases. During the linking phase, the -cl-opt-disable option is ignored and the backend optimizes the module. -cl-opt-disable is ignored because it is not a permitted link-time option.
Offline compilation
In OpenCL 1.2, for offline compilation the compilation and linking steps are not available separately on the command line. Compilation and linking occur in one stage, with the source files you specify on the command line.
You can specify several build options together with the source files. These flags are applied to all files and all compilation phases from the frontend to the backend, to produce the final binary.
For example:
mali_clcc -cl-opt-disable file1.cl file2.cl -o prog.bin
Non-ConfidentialPDF file icon PDF versionARM 100614_0300_00_en
Copyright © 2012, 2013, 2015, 2016 ARM. All rights reserved.