]> gcc.gnu.org Git - gcc.git/blame - gcc/reload.h
Initial revision
[gcc.git] / gcc / reload.h
CommitLineData
b4e0cbb5
RK
1/* Communication between reload.c and reload1.c.
2 Copyright (C) 1987, 1991 Free Software Foundation, Inc.
3
4This file is part of GNU CC.
5
6GNU CC is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 2, or (at your option)
9any later version.
10
11GNU CC is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with GNU CC; see the file COPYING. If not, write to
18the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
19
20
defc614f
RK
21/* If secondary reloads are the same for inputs and outputs, define those
22 macros here. */
23
24#ifdef SECONDARY_RELOAD_CLASS
25#define SECONDARY_INPUT_RELOAD_CLASS(CLASS, MODE, X) \
26 SECONDARY_RELOAD_CLASS (CLASS, MODE, X)
27#define SECONDARY_OUTPUT_RELOAD_CLASS(CLASS, MODE, X) \
28 SECONDARY_RELOAD_CLASS (CLASS, MODE, X)
29#endif
30
31/* If either macro is defined, show that we need secondary reloads. */
32#if defined(SECONDARY_INPUT_RELOAD_CLASS) || defined(SECONDARY_OUTPUT_RELOAD_CLASS)
33#define HAVE_SECONDARY_RELOADS
34#endif
35
b4e0cbb5
RK
36/* See reload.c and reload1.c for comments on these variables. */
37
38/* Maximum number of reloads we can need. */
39#define MAX_RELOADS (2 * MAX_RECOG_OPERANDS * (MAX_REGS_PER_ADDRESS + 1))
40
41extern rtx reload_in[MAX_RELOADS];
42extern rtx reload_out[MAX_RELOADS];
43extern rtx reload_in_reg[MAX_RELOADS];
44extern enum reg_class reload_reg_class[MAX_RELOADS];
45extern enum machine_mode reload_inmode[MAX_RELOADS];
46extern enum machine_mode reload_outmode[MAX_RELOADS];
47extern char reload_strict_low[MAX_RELOADS];
48extern char reload_optional[MAX_RELOADS];
49extern int reload_inc[MAX_RELOADS];
50extern int reload_needed_for_multiple[MAX_RELOADS];
51extern rtx reload_needed_for[MAX_RELOADS];
52extern int reload_secondary_reload[MAX_RELOADS];
53extern int reload_secondary_p[MAX_RELOADS];
defc614f
RK
54#ifdef MAX_INSN_CODE
55extern enum insn_code reload_secondary_icode[MAX_RELOADS];
56#endif
b4e0cbb5
RK
57extern int n_reloads;
58
59extern rtx reload_reg_rtx[MAX_RELOADS];
60
61enum reload_when_needed
62{
63 RELOAD_FOR_INPUT_RELOAD_ADDRESS,
64 RELOAD_FOR_OUTPUT_RELOAD_ADDRESS,
65 RELOAD_FOR_OPERAND_ADDRESS,
66 /* The following two are not fully implemented.
67 They are used in emitting insns, but they aren't distinguished from
68 RELOAD_OTHER when computing the number of spills. What they accomplish
69 is to avoid precluding inheritance of already loaded values
70 for input reloads when there are also output reloads. */
71 RELOAD_FOR_INPUT,
72 RELOAD_FOR_OUTPUT,
73 RELOAD_OTHER
74};
75
76extern enum reload_when_needed reload_when_needed[MAX_RELOADS];
77
78extern rtx *reg_equiv_constant;
79extern rtx *reg_equiv_address;
80extern rtx *reg_equiv_mem;
81
82/* All the "earlyclobber" operands of the current insn
83 are recorded here. */
84extern int n_earlyclobbers;
85extern rtx reload_earlyclobbers[MAX_RECOG_OPERANDS];
86
87/* First uid used by insns created by reload in this function.
88 Used in find_equiv_reg. */
89extern int reload_first_uid;
90
91/* Nonzero if indirect addressing is supported when the innermost MEM is
92 of the form (MEM (SYMBOL_REF sym)). It is assumed that the level to
93 which these are valid is the same as spill_indirect_levels, above. */
94
95extern char indirect_symref_ok;
96
97/* Nonzero if an address (plus (reg frame_pointer) (reg ...)) is valid. */
98extern char double_reg_address_ok;
99
defc614f
RK
100#ifdef MAX_INSN_CODE
101/* These arrays record the insn_code of insns that may be needed to
102 perform input and output reloads of special objects. They provide a
103 place to pass a scratch register. */
104extern enum insn_code reload_in_optab[];
105extern enum insn_code reload_out_optab[];
106#endif
107
5959a84d
RK
108extern void init_reload ();
109extern void find_reloads ();
110extern void subst_reloads ();
111extern rtx eliminate_regs ();
112extern rtx gen_input_reload ();
This page took 0.037889 seconds and 5 git commands to generate.