summaryrefslogtreecommitdiff
path: root/gcc/reload.h
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2010-07-12 18:53:59 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2010-07-12 18:53:59 +0000
commitd474db84488c71868483429070d545811adbc677 (patch)
tree81833811781814bd7dc33b609cd55e47bc56fc7e /gcc/reload.h
parent7bf84454ff6670c4e44561dc3f1de0b2eaa011fa (diff)
downloadgcc-d474db84488c71868483429070d545811adbc677.tar.gz
Makefile.in (target-globals.o): Depend on reload.h.
gcc/ * Makefile.in (target-globals.o): Depend on reload.h. * reload.h (target_reload): New structure. (default_target_reload): Declare. (this_target_reload): Declare as a variable or define as a macro. (indirect_symref_ok, double_reg_address_ok): Redefine as macros. * reload1.c (default_target_reload): New variable (this_target_reload): New conditional variable. (indirect_symref_ok, double_reg_address_ok): Delete. (spill_indirect_levels): Redefine as a macro. * target-globals.h (this_target_reload): Declare. (target_globals): Add a reload field. (restore_target_globals): Copy the reload field to this_target_reload. * target-globals.c: Include hard-reg-set.h. (default_target_globals): Initialize the reload field. (save_target_globals): Likewise. From-SVN: r162093
Diffstat (limited to 'gcc/reload.h')
-rw-r--r--gcc/reload.h40
1 files changed, 31 insertions, 9 deletions
diff --git a/gcc/reload.h b/gcc/reload.h
index a3c1f07bd9f..48b8dfd0386 100644
--- a/gcc/reload.h
+++ b/gcc/reload.h
@@ -154,6 +154,37 @@ extern struct reload rld[MAX_RELOADS];
extern int n_reloads;
#endif
+/* Target-dependent globals. */
+struct target_reload {
+ /* Nonzero if indirect addressing is supported when the innermost MEM is
+ of the form (MEM (SYMBOL_REF sym)). It is assumed that the level to
+ which these are valid is the same as spill_indirect_levels, above. */
+ bool x_indirect_symref_ok;
+
+ /* Nonzero if an address (plus (reg frame_pointer) (reg ...)) is valid. */
+ bool x_double_reg_address_ok;
+
+ /* Nonzero if indirect addressing is supported on the machine; this means
+ that spilling (REG n) does not require reloading it into a register in
+ order to do (MEM (REG n)) or (MEM (PLUS (REG n) (CONST_INT c))). The
+ value indicates the level of indirect addressing supported, e.g., two
+ means that (MEM (MEM (REG n))) is also valid if (REG n) does not get
+ a hard register. */
+ bool x_spill_indirect_levels;
+};
+
+extern struct target_reload default_target_reload;
+#if SWITCHABLE_TARGET
+extern struct target_reload *this_target_reload;
+#else
+#define this_target_reload (&default_target_reload)
+#endif
+
+#define indirect_symref_ok \
+ (this_target_reload->x_indirect_symref_ok)
+#define double_reg_address_ok \
+ (this_target_reload->x_double_reg_address_ok)
+
extern GTY (()) VEC(rtx,gc) *reg_equiv_memory_loc_vec;
extern rtx *reg_equiv_constant;
extern rtx *reg_equiv_invariant;
@@ -181,15 +212,6 @@ extern int reload_n_operands;
Used in find_equiv_reg. */
extern int reload_first_uid;
-/* Nonzero if indirect addressing is supported when the innermost MEM is
- of the form (MEM (SYMBOL_REF sym)). It is assumed that the level to
- which these are valid is the same as spill_indirect_levels, above. */
-
-extern char indirect_symref_ok;
-
-/* Nonzero if an address (plus (reg frame_pointer) (reg ...)) is valid. */
-extern char double_reg_address_ok;
-
extern int num_not_at_initial_offset;
#if defined SET_HARD_REG_BIT && defined CLEAR_REG_SET