2007-12-17 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git] / gcc / ira.h
blob394a590210dd84344e0ec05886e5fd806cc42d31
1 /* Communication between the Integrated Register Allocator and rest of
2 the compiler.
3 Copyright (C) 2006, 2007
4 Free Software Foundation, Inc.
5 Contributed by Vladimir Makarov <vmakarov@redhat.com>.
7 This file is part of GCC.
9 GCC is free software; you can redistribute it and/or modify it under
10 the terms of the GNU General Public License as published by the Free
11 Software Foundation; either version 2, or (at your option) any later
12 version.
14 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
15 WARRANTY; without even the implied warranty of MERCHANTABILITY or
16 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
17 for more details.
19 You should have received a copy of the GNU General Public License
20 along with GCC; see the file COPYING. If not, write to the Free
21 Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
22 02110-1301, USA. */
25 /* If secondary reloads are the same for inputs and outputs, define those
26 macros here. */
28 #ifdef SECONDARY_RELOAD_CLASS
29 #define SECONDARY_INPUT_RELOAD_CLASS(CLASS, MODE, X) \
30 SECONDARY_RELOAD_CLASS (CLASS, MODE, X)
31 #define SECONDARY_OUTPUT_RELOAD_CLASS(CLASS, MODE, X) \
32 SECONDARY_RELOAD_CLASS (CLASS, MODE, X)
33 #endif
35 /* If either macro is defined, show that we need secondary reloads. */
36 #if defined(SECONDARY_INPUT_RELOAD_CLASS) || defined(SECONDARY_OUTPUT_RELOAD_CLASS)
37 #define HAVE_SECONDARY_RELOADS
38 #endif
40 /* If MEMORY_MOVE_COST isn't defined, give it a default here. */
41 #ifndef MEMORY_MOVE_COST
42 #ifdef HAVE_SECONDARY_RELOADS
43 #define MEMORY_MOVE_COST(MODE,CLASS,IN) \
44 (4 + memory_move_secondary_cost ((MODE), (CLASS), (IN)))
45 #else
46 #define MEMORY_MOVE_COST(MODE,CLASS,IN) 4
47 #endif
48 #endif
50 extern GTY (()) struct varray_head_tag *reg_equiv_memory_loc_varray;
51 extern rtx *reg_equiv_constant;
52 extern rtx *reg_equiv_memory_loc;
53 extern rtx *reg_equiv_address;
54 extern rtx *reg_equiv_mem;
56 extern void init_ira_once (void);
57 extern void finish_ira_once (void);
58 extern rtx ira_eliminate_regs (rtx, enum machine_mode);
60 extern void ira (FILE *);
61 extern void mark_allocation_change (int);
62 extern void retry_ira_color (int, HARD_REG_SET);
63 extern rtx reuse_stack_slot (int, unsigned int, unsigned int);
64 extern void mark_new_stack_slot (rtx, int, unsigned int);
65 extern void collect_pseudo_call_clobbered_regs (int, HARD_REG_SET *);