1 /* Communication between the Integrated Register Allocator and rest of
3 Copyright (C) 2006, 2007, 2008
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
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
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
25 /* If secondary reloads are the same for inputs and outputs, define those
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)
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
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)))
46 #define MEMORY_MOVE_COST(MODE,CLASS,IN) 4
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 init_ira (void);
58 extern void finish_ira_once (void);
59 extern rtx
ira_eliminate_regs (rtx
, enum machine_mode
);
60 extern void sort_insn_chain (int);
62 extern void ira (FILE *);
63 extern void sort_regnos_for_alter_reg (int *, int);
64 extern void mark_allocation_change (int);
65 extern void mark_memory_move_deletion (int, int);
66 extern int reassign_pseudos (int *, int, HARD_REG_SET
, HARD_REG_SET
*,
67 HARD_REG_SET
*, bitmap
);
68 extern rtx
reuse_stack_slot (int, unsigned int, unsigned int);
69 extern void mark_new_stack_slot (rtx
, int, unsigned int);
70 extern int better_spill_reload_regno_p (int *, int *, rtx
, rtx
, rtx
);
71 extern void collect_pseudo_call_clobbered_regs (int, HARD_REG_SET
*);