1 |
38 |
julius |
/* params.h - Run-time parameters.
|
2 |
|
|
Copyright (C) 2001, 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
|
3 |
|
|
Written by Mark Mitchell <mark@codesourcery.com>.
|
4 |
|
|
|
5 |
|
|
This file is part of GCC.
|
6 |
|
|
|
7 |
|
|
GCC is free software; you can redistribute it and/or modify it under
|
8 |
|
|
the terms of the GNU General Public License as published by the Free
|
9 |
|
|
Software Foundation; either version 3, or (at your option) any later
|
10 |
|
|
version.
|
11 |
|
|
|
12 |
|
|
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
|
13 |
|
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
14 |
|
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
15 |
|
|
for more details.
|
16 |
|
|
|
17 |
|
|
You should have received a copy of the GNU General Public License
|
18 |
|
|
along with GCC; see the file COPYING3. If not see
|
19 |
|
|
<http://www.gnu.org/licenses/>. */
|
20 |
|
|
|
21 |
|
|
/* This module provides a means for setting integral parameters
|
22 |
|
|
dynamically. Instead of encoding magic numbers in various places,
|
23 |
|
|
use this module to organize all the magic numbers in a single
|
24 |
|
|
place. The values of the parameters can be set on the
|
25 |
|
|
command-line, thereby providing a way to control the amount of
|
26 |
|
|
effort spent on particular optimization passes, or otherwise tune
|
27 |
|
|
the behavior of the compiler.
|
28 |
|
|
|
29 |
|
|
Since their values can be set on the command-line, these parameters
|
30 |
|
|
should not be used for non-dynamic memory allocation. */
|
31 |
|
|
|
32 |
|
|
#ifndef GCC_PARAMS_H
|
33 |
|
|
#define GCC_PARAMS_H
|
34 |
|
|
|
35 |
|
|
/* No parameter shall have this value. */
|
36 |
|
|
|
37 |
|
|
#define INVALID_PARAM_VAL (-1)
|
38 |
|
|
|
39 |
|
|
/* The information associated with each parameter. */
|
40 |
|
|
|
41 |
|
|
typedef struct param_info
|
42 |
|
|
{
|
43 |
|
|
/* The name used with the `--param <name>=<value>' switch to set this
|
44 |
|
|
value. */
|
45 |
|
|
const char *const option;
|
46 |
|
|
/* The associated value. */
|
47 |
|
|
int value;
|
48 |
|
|
|
49 |
|
|
/* Minimum acceptable value. */
|
50 |
|
|
int min_value;
|
51 |
|
|
|
52 |
|
|
/* Maximum acceptable value, if greater than minimum */
|
53 |
|
|
int max_value;
|
54 |
|
|
|
55 |
|
|
/* A short description of the option. */
|
56 |
|
|
const char *const help;
|
57 |
|
|
} param_info;
|
58 |
|
|
|
59 |
|
|
/* An array containing the compiler parameters and their current
|
60 |
|
|
values. */
|
61 |
|
|
|
62 |
|
|
extern param_info *compiler_params;
|
63 |
|
|
|
64 |
|
|
/* Add the N PARAMS to the current list of compiler parameters. */
|
65 |
|
|
|
66 |
|
|
extern void add_params (const param_info params[], size_t n);
|
67 |
|
|
|
68 |
|
|
/* Set the VALUE associated with the parameter given by NAME. */
|
69 |
|
|
|
70 |
|
|
extern void set_param_value (const char *name, int value);
|
71 |
|
|
|
72 |
|
|
|
73 |
|
|
/* The parameters in use by language-independent code. */
|
74 |
|
|
|
75 |
|
|
typedef enum compiler_param
|
76 |
|
|
{
|
77 |
|
|
#define DEFPARAM(enumerator, option, msgid, default, min, max) \
|
78 |
|
|
enumerator,
|
79 |
|
|
#include "params.def"
|
80 |
|
|
#undef DEFPARAM
|
81 |
|
|
LAST_PARAM
|
82 |
|
|
} compiler_param;
|
83 |
|
|
|
84 |
|
|
/* The value of the parameter given by ENUM. */
|
85 |
|
|
#define PARAM_VALUE(ENUM) \
|
86 |
|
|
(compiler_params[(int) ENUM].value)
|
87 |
|
|
|
88 |
|
|
/* Macros for the various parameters. */
|
89 |
|
|
#define SALIAS_MAX_IMPLICIT_FIELDS \
|
90 |
|
|
PARAM_VALUE (PARAM_SALIAS_MAX_IMPLICIT_FIELDS)
|
91 |
|
|
#define SALIAS_MAX_ARRAY_ELEMENTS \
|
92 |
|
|
PARAM_VALUE (PARAM_SALIAS_MAX_ARRAY_ELEMENTS)
|
93 |
|
|
#define SRA_MAX_STRUCTURE_SIZE \
|
94 |
|
|
PARAM_VALUE (PARAM_SRA_MAX_STRUCTURE_SIZE)
|
95 |
|
|
#define SRA_MAX_STRUCTURE_COUNT \
|
96 |
|
|
PARAM_VALUE (PARAM_SRA_MAX_STRUCTURE_COUNT)
|
97 |
|
|
#define SRA_FIELD_STRUCTURE_RATIO \
|
98 |
|
|
PARAM_VALUE (PARAM_SRA_FIELD_STRUCTURE_RATIO)
|
99 |
|
|
#define MAX_INLINE_INSNS_SINGLE \
|
100 |
|
|
PARAM_VALUE (PARAM_MAX_INLINE_INSNS_SINGLE)
|
101 |
|
|
#define MAX_INLINE_INSNS \
|
102 |
|
|
PARAM_VALUE (PARAM_MAX_INLINE_INSNS)
|
103 |
|
|
#define MAX_INLINE_SLOPE \
|
104 |
|
|
PARAM_VALUE (PARAM_MAX_INLINE_SLOPE)
|
105 |
|
|
#define MIN_INLINE_INSNS \
|
106 |
|
|
PARAM_VALUE (PARAM_MIN_INLINE_INSNS)
|
107 |
|
|
#define MAX_INLINE_INSNS_AUTO \
|
108 |
|
|
PARAM_VALUE (PARAM_MAX_INLINE_INSNS_AUTO)
|
109 |
|
|
#define MAX_VARIABLE_EXPANSIONS \
|
110 |
|
|
PARAM_VALUE (PARAM_MAX_VARIABLE_EXPANSIONS)
|
111 |
|
|
#define MAX_DELAY_SLOT_INSN_SEARCH \
|
112 |
|
|
PARAM_VALUE (PARAM_MAX_DELAY_SLOT_INSN_SEARCH)
|
113 |
|
|
#define MAX_DELAY_SLOT_LIVE_SEARCH \
|
114 |
|
|
PARAM_VALUE (PARAM_MAX_DELAY_SLOT_LIVE_SEARCH)
|
115 |
|
|
#define MAX_PENDING_LIST_LENGTH \
|
116 |
|
|
PARAM_VALUE (PARAM_MAX_PENDING_LIST_LENGTH)
|
117 |
|
|
#define MAX_GCSE_MEMORY \
|
118 |
|
|
((size_t) PARAM_VALUE (PARAM_MAX_GCSE_MEMORY))
|
119 |
|
|
#define MAX_GCSE_PASSES \
|
120 |
|
|
PARAM_VALUE (PARAM_MAX_GCSE_PASSES)
|
121 |
|
|
#define GCSE_AFTER_RELOAD_PARTIAL_FRACTION \
|
122 |
|
|
PARAM_VALUE (PARAM_GCSE_AFTER_RELOAD_PARTIAL_FRACTION)
|
123 |
|
|
#define GCSE_AFTER_RELOAD_CRITICAL_FRACTION \
|
124 |
|
|
PARAM_VALUE (PARAM_GCSE_AFTER_RELOAD_CRITICAL_FRACTION)
|
125 |
|
|
#define MAX_UNROLLED_INSNS \
|
126 |
|
|
PARAM_VALUE (PARAM_MAX_UNROLLED_INSNS)
|
127 |
|
|
#define MAX_SMS_LOOP_NUMBER \
|
128 |
|
|
PARAM_VALUE (PARAM_MAX_SMS_LOOP_NUMBER)
|
129 |
|
|
#define SMS_MAX_II_FACTOR \
|
130 |
|
|
PARAM_VALUE (PARAM_SMS_MAX_II_FACTOR)
|
131 |
|
|
#define SMS_DFA_HISTORY \
|
132 |
|
|
PARAM_VALUE (PARAM_SMS_DFA_HISTORY)
|
133 |
|
|
#define SMS_LOOP_AVERAGE_COUNT_THRESHOLD \
|
134 |
|
|
PARAM_VALUE (PARAM_SMS_LOOP_AVERAGE_COUNT_THRESHOLD)
|
135 |
|
|
#define GLOBAL_VAR_THRESHOLD \
|
136 |
|
|
PARAM_VALUE (PARAM_GLOBAL_VAR_THRESHOLD)
|
137 |
|
|
#define MAX_ALIASED_VOPS \
|
138 |
|
|
PARAM_VALUE (PARAM_MAX_ALIASED_VOPS)
|
139 |
|
|
#define INTEGER_SHARE_LIMIT \
|
140 |
|
|
PARAM_VALUE (PARAM_INTEGER_SHARE_LIMIT)
|
141 |
|
|
#define MAX_LAST_VALUE_RTL \
|
142 |
|
|
PARAM_VALUE (PARAM_MAX_LAST_VALUE_RTL)
|
143 |
|
|
#define MIN_VIRTUAL_MAPPINGS \
|
144 |
|
|
PARAM_VALUE (PARAM_MIN_VIRTUAL_MAPPINGS)
|
145 |
|
|
#define VIRTUAL_MAPPINGS_TO_SYMS_RATIO \
|
146 |
|
|
PARAM_VALUE (PARAM_VIRTUAL_MAPPINGS_TO_SYMS_RATIO)
|
147 |
|
|
#define MAX_FIELDS_FOR_FIELD_SENSITIVE \
|
148 |
|
|
((size_t) PARAM_VALUE (PARAM_MAX_FIELDS_FOR_FIELD_SENSITIVE))
|
149 |
|
|
#define MAX_SCHED_READY_INSNS \
|
150 |
|
|
PARAM_VALUE (PARAM_MAX_SCHED_READY_INSNS)
|
151 |
|
|
#endif /* ! GCC_PARAMS_H */
|