GCC Middle and Back End API Reference
params.c File Reference

Functions

void add_params ()
void global_init_params ()
void finish_params ()
static void set_param_value_internal (compiler_param num, int value, int *params, int *params_set, bool explicit_p)
void set_param_value (const char *name, int value, int *params, int *params_set)
void maybe_set_param_value (compiler_param num, int value, int *params, int *params_set)
void set_default_param_value ()
int default_param_value ()
void init_param_values ()
size_t get_num_compiler_params ()

Variables

param_infocompiler_params
static size_t num_compiler_params
static bool params_finished
static const param_info lang_independent_params []

Function Documentation

void add_params ( )
   Add the N PARAMS to the current list of compiler parameters.  
     Allocate enough space for the new parameters.  
     Copy them into the table.  
     Keep track of how many parameters we have.  
int default_param_value ( )
   Return the default value of parameter NUM.  

References num_compiler_params.

void finish_params ( void  )
   Note that all parameters have been added and all default values
   set.  

References params_finished.

size_t get_num_compiler_params ( void  )
   Return the current value of num_compiler_params, for the benefit of
   plugins that use parameters as features.  
void global_init_params ( void  )
   Add all parameters and default values that can be set in both the
   driver and the compiler proper.  

References params_finished.

void init_param_values ( )
   Initialize an array PARAMS with default values of the
   parameters.  
void maybe_set_param_value ( compiler_param  num,
int  value,
int *  params,
int *  params_set 
)
   Set the value of the parameter given by NUM to VALUE in PARAMS and
   PARAMS_SET, implicitly, if it has not been set explicitly by the
   user.  
void set_default_param_value ( )
   Set the default value of a parameter given by NUM to VALUE, before
   option processing.  

References num_compiler_params, and params_finished.

void set_param_value ( const char *  name,
int  value,
int *  params,
int *  params_set 
)
   Set the VALUE associated with the parameter given by NAME in PARAMS
   and PARAMS_SET.  
     Make sure nobody tries to set a parameter to an invalid value.  
     Scan the parameter table to find a matching entry.  
     If we didn't find this parameter, issue an error message.  
static void set_param_value_internal ( compiler_param  num,
int  value,
int *  params,
int *  params_set,
bool  explicit_p 
)
static
   Set the value of the parameter given by NUM to VALUE in PARAMS and
   PARAMS_SET.  If EXPLICIT_P, this is being set by the user;
   otherwise it is being set implicitly by the compiler.  

Variable Documentation

param_info* compiler_params
@verbatim 

params.c - Run-time parameters. Copyright (C) 2001-2013 Free Software Foundation, Inc. Written by Mark Mitchell mark@.nosp@m.code.nosp@m.sourc.nosp@m.ery..nosp@m.com.

This file is part of GCC.

GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.

GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see http://www.gnu.org/licenses/.

   An array containing the compiler parameters and their current
   values.  

Referenced by wrap_help().

const param_info lang_independent_params[]
static
Initial value:
{
#define DEFPARAM(ENUM, OPTION, HELP, DEFAULT, MIN, MAX) \
{ OPTION, DEFAULT, MIN, MAX, HELP },
#include "params.def"
#undef DEFPARAM
{ NULL, 0, 0, 0, NULL }
}
size_t num_compiler_params
static
   The number of entries in the table.  

Referenced by default_param_value(), and set_default_param_value().

bool params_finished
static
   Whether the parameters have all been initialized and had their
   default values determined.  

Referenced by finish_params(), global_init_params(), and set_default_param_value().