diff options
author | Zdenek Dvorak <dvorakz@suse.cz> | 2007-04-17 18:42:29 +0200 |
---|---|---|
committer | Zdenek Dvorak <rakdver@gcc.gnu.org> | 2007-04-17 16:42:29 +0000 |
commit | a154b43a811a710525c1da93ea4f97c97c9327f9 (patch) | |
tree | 0a31c59ebc8695e61c56119d3a3890c7117e0a43 /gcc/cfgloop.h | |
parent | faf28b3a89f32229935b0f60383423315121eb8d (diff) | |
download | gcc-a154b43a811a710525c1da93ea4f97c97c9327f9.zip gcc-a154b43a811a710525c1da93ea4f97c97c9327f9.tar.gz gcc-a154b43a811a710525c1da93ea4f97c97c9327f9.tar.bz2 |
re PR rtl-optimization/31360 (RTL loop invariant is not aggressive enough)
PR rtl-optimization/31360
* cfgloopanal.c (target_small_cost, target_pres_cost): Removed.
(target_reg_cost): New.
(init_set_costs): Initialize target_reg_cost. Add comments
regarding the rationale of the costs.
(global_cost_for_size): Renamed to...
(estimate_reg_pressure_cost): ... and simplify. Decrease importance
of register pressure.
* tree-ssa-loop-ivopts.c (ivopts_global_cost_for_size): Use
estimate_reg_pressure_cost. Add number of ivs.
(determine_set_costs): Dump target_reg_cost.
* loop-invariant.c (gain_for_invariant): Use
estimate_reg_pressure_cost. Removed n_inv_uses argument.
(best_gain_for_invariant, find_invariants_to_move): Remove
n_inv_uses.
* cfgloop.h (target_small_cost, target_pres_cost): Removed.
(target_reg_cost): Declare.
(global_cost_for_size): Declaration removed.
(estimate_reg_pressure_cost): Declare.
* gcc.dg/loop-7.c: New test.
From-SVN: r123919
Diffstat (limited to 'gcc/cfgloop.h')
-rw-r--r-- | gcc/cfgloop.h | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/gcc/cfgloop.h b/gcc/cfgloop.h index 15d5589..5216063 100644 --- a/gcc/cfgloop.h +++ b/gcc/cfgloop.h @@ -562,18 +562,14 @@ fel_init (loop_iterator *li, loop_p *loop, unsigned flags) /* The properties of the target. */ -extern unsigned target_avail_regs; /* Number of available registers. */ -extern unsigned target_res_regs; /* Number of reserved registers. */ -extern unsigned target_small_cost; /* The cost for register when there - is a free one. */ -extern unsigned target_pres_cost; /* The cost for register when there are - not too many free ones. */ -extern unsigned target_spill_cost; /* The cost for register when we need - to spill. */ +extern unsigned target_avail_regs; +extern unsigned target_res_regs; +extern unsigned target_reg_cost; +extern unsigned target_spill_cost; /* Register pressure estimation for induction variable optimizations & loop invariant motion. */ -extern unsigned global_cost_for_size (unsigned, unsigned, unsigned); +extern unsigned estimate_reg_pressure_cost (unsigned, unsigned); extern void init_set_costs (void); /* Loop optimizer initialization. */ |