diff options
author | Richard Sandiford <rdsandiford@googlemail.com> | 2010-07-12 19:02:55 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2010-07-12 19:02:55 +0000 |
commit | 4391924a335032f89f99247f2dad59c4b47b7a7a (patch) | |
tree | 8d8e2175f8a02aff3689db8673741343a8f10fbf /gcc/cfgloop.h | |
parent | 9d86796b627350ba83fcdf4e101805ae4edf08a6 (diff) | |
download | gcc-4391924a335032f89f99247f2dad59c4b47b7a7a.zip gcc-4391924a335032f89f99247f2dad59c4b47b7a7a.tar.gz gcc-4391924a335032f89f99247f2dad59c4b47b7a7a.tar.bz2 |
Makefile.in (target-globals.o): Depend on $(CFGLOOP_H).
gcc/
* Makefile.in (target-globals.o): Depend on $(CFGLOOP_H).
* cfgloop.h (target_cfgloop): New structure.
(default_target_cfgloop): Declare.
(this_target_cfgloop): Declare as a variable or define as a macro.
(target_avail_regs, target_clobbered_regs, target_res_regs)
(target_reg_cost, target_spill_cost): Redefine as macros.
* cfgloopanal.c (default_target_cfgloop): New variable.
(this_target_cfgloop): New conditional variable.
(target_avail_regs, target_clobbered_regs, target_res_regs)
(target_reg_cost, target_spill_cost): Delete.
* target-globals.h (this_target_cfgloop): Declare.
(target_globals): Add a cfgloop field.
(restore_target_globals): Copy the cfgloop field to
this_target_cfgloop.
* target-globals.c: Include cfgloop.h.
(default_target_globals): Initialize the cfgloop field.
(save_target_globals): Likewise.
From-SVN: r162101
Diffstat (limited to 'gcc/cfgloop.h')
-rw-r--r-- | gcc/cfgloop.h | 39 |
1 files changed, 34 insertions, 5 deletions
diff --git a/gcc/cfgloop.h b/gcc/cfgloop.h index 46cda11..535e256 100644 --- a/gcc/cfgloop.h +++ b/gcc/cfgloop.h @@ -625,12 +625,41 @@ fel_init (loop_iterator *li, loop_p *loop, unsigned flags) } /* The properties of the target. */ +struct target_cfgloop { + /* Number of available registers. */ + unsigned x_target_avail_regs; -extern unsigned target_avail_regs; -extern unsigned target_clobbered_regs; -extern unsigned target_res_regs; -extern unsigned target_reg_cost [2]; -extern unsigned target_spill_cost [2]; + /* Number of available registers that are call-clobbered. */ + unsigned x_target_clobbered_regs; + + /* Number of registers reserved for temporary expressions. */ + unsigned x_target_res_regs; + + /* The cost for register when there still is some reserve, but we are + approaching the number of available registers. */ + unsigned x_target_reg_cost[2]; + + /* The cost for register when we need to spill. */ + unsigned x_target_spill_cost[2]; +}; + +extern struct target_cfgloop default_target_cfgloop; +#if SWITCHABLE_TARGET +extern struct target_cfgloop *this_target_cfgloop; +#else +#define this_target_cfgloop (&default_target_cfgloop) +#endif + +#define target_avail_regs \ + (this_target_cfgloop->x_target_avail_regs) +#define target_clobbered_regs \ + (this_target_cfgloop->x_target_clobbered_regs) +#define target_res_regs \ + (this_target_cfgloop->x_target_res_regs) +#define target_reg_cost \ + (this_target_cfgloop->x_target_reg_cost) +#define target_spill_cost \ + (this_target_cfgloop->x_target_spill_cost) /* Register pressure estimation for induction variable optimizations & loop invariant motion. */ |