]> gcc.gnu.org Git - gcc.git/blame - gcc/params.h
flags.h (enum debug_info_type): Remove DWARF_DEBUG.
[gcc.git] / gcc / params.h
CommitLineData
c6d9a88c 1/* params.h - Run-time parameters.
ca2b05ba 2 Copyright (C) 2001, 2003, 2004 Free Software Foundation, Inc.
c6d9a88c
MM
3 Written by Mark Mitchell <mark@codesourcery.com>.
4
1322177d 5This file is part of GCC.
c6d9a88c 6
1322177d
LB
7GCC is free software; you can redistribute it and/or modify it under
8the terms of the GNU General Public License as published by the Free
9Software Foundation; either version 2, or (at your option) any later
10version.
c6d9a88c 11
1322177d
LB
12GCC is distributed in the hope that it will be useful, but WITHOUT ANY
13WARRANTY; without even the implied warranty of MERCHANTABILITY or
14FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15for more details.
c6d9a88c
MM
16
17You should have received a copy of the GNU General Public License
1322177d
LB
18along with GCC; see the file COPYING. If not, write to the Free
19Software Foundation, 59 Temple Place - Suite 330, Boston, MA
2002111-1307, USA.
c6d9a88c
MM
21
22*/
23
24/* This module provides a means for setting integral parameters
25 dynamically. Instead of encoding magic numbers in various places,
26 use this module to organize all the magic numbers in a single
27 place. The values of the parameters can be set on the
28 command-line, thereby providing a way to control the amount of
29 effort spent on particular optimization passes, or otherwise tune
0443f602
JO
30 the behavior of the compiler.
31
32 Since their values can be set on the command-line, these parameters
33 should not be used for non-dynamic memory allocation. */
c6d9a88c 34
88657302
RH
35#ifndef GCC_PARAMS_H
36#define GCC_PARAMS_H
c6d9a88c
MM
37
38/* No parameter shall have this value. */
39
40#define INVALID_PARAM_VAL (-1)
41
42/* The information associated with each parameter. */
43
44typedef struct param_info
45{
46 /* The name used with the `--param <name>=<value>' switch to set this
47 value. */
8b60264b 48 const char *const option;
c6d9a88c
MM
49 /* The associated value. */
50 int value;
1c4c47db 51 /* A short description of the option. */
8b60264b 52 const char *const help;
c6d9a88c
MM
53} param_info;
54
55/* An array containing the compiler parameters and their current
56 values. */
57
58extern param_info *compiler_params;
59
60/* Add the N PARAMS to the current list of compiler parameters. */
61
3d7aafde 62extern void add_params (const param_info params[], size_t n);
c6d9a88c
MM
63
64/* Set the VALUE associated with the parameter given by NAME. */
65
3d7aafde 66extern void set_param_value (const char *name, int value);
c6d9a88c
MM
67
68\f
69/* The parameters in use by language-independent code. */
70
71typedef enum compiler_param
72{
bd571ffc
ZW
73#define DEFPARAM(enumerator, option, msgid, default) \
74 enumerator,
c6d9a88c 75#include "params.def"
6a4d6760 76#undef DEFPARAM
c6d9a88c
MM
77 LAST_PARAM
78} compiler_param;
79
80/* The value of the parameter given by ENUM. */
81#define PARAM_VALUE(ENUM) \
82 (compiler_params[(int) ENUM].value)
6a4d6760 83
c6d9a88c 84/* Macros for the various parameters. */
a6227154
KG
85#define MAX_INLINE_INSNS_SINGLE \
86 PARAM_VALUE (PARAM_MAX_INLINE_INSNS_SINGLE)
c6d9a88c
MM
87#define MAX_INLINE_INSNS \
88 PARAM_VALUE (PARAM_MAX_INLINE_INSNS)
a6227154
KG
89#define MAX_INLINE_SLOPE \
90 PARAM_VALUE (PARAM_MAX_INLINE_SLOPE)
91#define MIN_INLINE_INSNS \
92 PARAM_VALUE (PARAM_MIN_INLINE_INSNS)
bc522472
KG
93#define MAX_INLINE_INSNS_AUTO \
94 PARAM_VALUE (PARAM_MAX_INLINE_INSNS_AUTO)
95#define MAX_INLINE_INSNS_RTL \
96 PARAM_VALUE (PARAM_MAX_INLINE_INSNS_RTL)
0443f602
JO
97#define MAX_DELAY_SLOT_INSN_SEARCH \
98 PARAM_VALUE (PARAM_MAX_DELAY_SLOT_INSN_SEARCH)
d5d063d7
JO
99#define MAX_DELAY_SLOT_LIVE_SEARCH \
100 PARAM_VALUE (PARAM_MAX_DELAY_SLOT_LIVE_SEARCH)
4a121cc3
AM
101#define MAX_PENDING_LIST_LENGTH \
102 PARAM_VALUE (PARAM_MAX_PENDING_LIST_LENGTH)
f1fa37ff
MM
103#define MAX_GCSE_MEMORY \
104 ((size_t) PARAM_VALUE (PARAM_MAX_GCSE_MEMORY))
740f35a0
DB
105#define MAX_GCSE_PASSES \
106 PARAM_VALUE (PARAM_MAX_GCSE_PASSES)
f9957958
MH
107#define GCSE_AFTER_RELOAD_PARTIAL_FRACTION \
108 PARAM_VALUE (PARAM_GCSE_AFTER_RELOAD_PARTIAL_FRACTION)
109#define GCSE_AFTER_RELOAD_CRITICAL_FRACTION \
110 PARAM_VALUE (PARAM_GCSE_AFTER_RELOAD_CRITICAL_FRACTION)
03e9dbc9
MM
111#define MAX_UNROLLED_INSNS \
112 PARAM_VALUE (PARAM_MAX_UNROLLED_INSNS)
e5626198
AZ
113#define MAX_SMS_LOOP_NUMBER \
114 PARAM_VALUE (PARAM_MAX_SMS_LOOP_NUMBER)
115#define SMS_MAX_II_FACTOR \
116 PARAM_VALUE (PARAM_SMS_MAX_II_FACTOR)
117#define SMS_DFA_HISTORY \
118 PARAM_VALUE (PARAM_SMS_DFA_HISTORY)
119#define SMS_LOOP_AVERAGE_COUNT_THRESHOLD \
120 PARAM_VALUE (PARAM_SMS_LOOP_AVERAGE_COUNT_THRESHOLD)
6de9cd9a
DN
121#define GLOBAL_VAR_THRESHOLD \
122 PARAM_VALUE (PARAM_GLOBAL_VAR_THRESHOLD)
123#define MAX_ALIASED_VOPS \
124 PARAM_VALUE (PARAM_MAX_ALIASED_VOPS)
89b0433e
NS
125#define INTEGER_SHARE_LIMIT \
126 PARAM_VALUE (PARAM_INTEGER_SHARE_LIMIT)
88657302 127#endif /* ! GCC_PARAMS_H */
This page took 1.244328 seconds and 5 git commands to generate.