aboutsummaryrefslogtreecommitdiff
path: root/gcc/regstat.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2008-01-16 17:32:05 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2008-01-16 16:32:05 +0000
commita03c6d64f468ff2aaebcf2a87bb589938264bc38 (patch)
treee7a65553b87a99438635f0d5abcf71b9c8210b5c /gcc/regstat.c
parent58c0b6524407250f48bb9c616943bf05a1ee6478 (diff)
downloadgcc-a03c6d64f468ff2aaebcf2a87bb589938264bc38.zip
gcc-a03c6d64f468ff2aaebcf2a87bb589938264bc38.tar.gz
gcc-a03c6d64f468ff2aaebcf2a87bb589938264bc38.tar.bz2
re PR rtl-optimization/31396 (Inline code performance much worse than out-of-line)
PR rtl-optimization/31396 * regstat.c (regstat_bb_compute_ri): Compute FREQ_CALLS_CROSSED. * cfg.c (dump_reg_info): Print it. * regs.h (struct reg_info_t): add freq_calls_crossed. (REG_FREQ_CALLS_CROSSED): New macro. * global.c (global_alloc): Compute freq_calls_crossed for allocno. (find_reg): Update call of CALLER_SAVE_PROFITABLE. * regmove.c (optimize_reg_copy_1, optimize_reg_copy_2, fixup_match_2, regmove_optimize): Update call crossed frequencies. * local-alloc.c (struct qty): Add freq_calls_crossed. (alloc_qty): Copute freq_calls_crossed. (update_equiv_regs, combine_regs): Update REG_FREQ_CALLS_CROSSED. (find_free_reg): Update call of CALLER_SAVE_PROFITABLE. * ra.h (struct allocno): Add freq_calls_crossed. From-SVN: r131576
Diffstat (limited to 'gcc/regstat.c')
-rw-r--r--gcc/regstat.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/regstat.c b/gcc/regstat.c
index 9f8e41f..26f9607 100644
--- a/gcc/regstat.c
+++ b/gcc/regstat.c
@@ -180,6 +180,7 @@ regstat_bb_compute_ri (unsigned int bb_index,
EXECUTE_IF_SET_IN_BITMAP (live, 0, regno, bi)
{
REG_N_CALLS_CROSSED (regno)++;
+ REG_FREQ_CALLS_CROSSED (regno) += REG_FREQ_FROM_BB (bb);
if (can_throw)
REG_N_THROWING_CALLS_CROSSED (regno)++;
@@ -445,7 +446,10 @@ regstat_bb_compute_calls_crossed (unsigned int bb_index, bitmap live)
{
bitmap_iterator bi;
EXECUTE_IF_SET_IN_BITMAP (live, 0, regno, bi)
- REG_N_CALLS_CROSSED (regno)++;
+ {
+ REG_N_CALLS_CROSSED (regno)++;
+ REG_FREQ_CALLS_CROSSED (regno) += REG_FREQ_FROM_BB (bb);
+ }
}
/* All of the defs except the return value are some sort of