Option Type | Default Value | #pragma options | C | C++ |
-qoption | - | ISOLATED_CALL | x | x |
Syntax
-qisolated_call=function_name ISOLATED_CALL=function_name
Purpose
Specifies functions in the source file that have no side effects.
Notes
function_name | Is the name of a function that does not
have side effects or does not rely on functions or
processes that have side effects. Side effects are any changes in the state of the runtime environment. Examples of such changes are accessing a volatile object, modifying an external object, modifying a file, or calling another function that does any of these things. Functions with no side effects cause no changes to external and static variables. function_name can be a list of functions separated by colons (:). |
Marking a function as isolated can improve the runtime performance of optimized code by indicating to the optimizer that external and static variables are not changed by the called function.
The #pragma options keyword isolated_call must be specified at the top of the file, before the first C or C++ statement. You can use the #pragma isolated_call directive at any point in your source file.
Example
To compile myprogram.c, specifying that the functions myfunction(int)
and classfunction(double) do not have side
effects, enter:
xlC myprogram.c -qisolated_call=myfunction:classfunction