From cTuning.org

Jump to: navigation, search

Features can be either simple - strings, numbers, etc., or structured. Curently, only array-based structured features are supported (in the future, struct-based features may also be introduced). The elements of a structured feature are called subfeatures.

Features and their subfeatures are always accessed by their name.

Features can be either constant (the working directory of the compiler, the set of all command-line flags) or dynamically changing, e.g., the name of the function currently being compiled.

Feature values are not modifiable. However, the values of subfeatures can be modified; in this way, the code of an ICI plugin can, e.g., modify the values of compiler parameters.

The content of a feature is always returned as a pointer to constant void type (const void *). On order to access the actual value of the feature, the user must first convert this pointer to the appropriate data type (as indicated in the table below).

Feature name Type of contents Purpose
"compiler_flags" array of strings, i.e., char ** Array of strings representing the names of all known command-line options (flags) of the compiler. Individual option names are stored WITHOUT the leading dash ('-').
"compiler_params" array of strings, i.e., char ** Array of strings representing the names of all known compiler parameters.
"function_name" string, i.e., char * Name of the function currently being compiled.
"function_decl_filename" string, i.e., char * Name of the file in which the function currently being compiled was declared. Returns the filename corresponding to the most recent declaration.
"function_decl_line" integer, i.e., int Line number at which the function currently being compiled was declared. In conjuction with feature "function_decl_filename" gives the location of the most recent declaration of the current function.
"function_filename" string, i.e., char * Name of the file in which the function currently being compiled was defined.
"function_start_line" integer, i.e., int Line number at which the definition of the current function effectively starts. Corresponds to the first line of the body of the current function.
"function_end_line" integer, i.e., int Line number at which the definition of the current function effectively ends. Corresponds to the last line of the body of the current function.
"first_pass" string, i.e., char * Human-readable name of the first pass of the compiler. Accessing this feature has the side effect of setting that specific pass as the "current pass" of ICI.
"next_pass" string, i.e., char * Human-readable name of the next pass to be executed after the "current pass" of ICI. Accessing this feature has the side effect of advancing the "current pass" of ICI to its immediate successor in the currently defined pass chain.
Locations of visitors to this page

Tweet