summaryrefslogtreecommitdiffstats
path: root/contrib/gcc/global.c
diff options
context:
space:
mode:
authorkan <kan@FreeBSD.org>2006-08-26 21:29:10 +0000
committerkan <kan@FreeBSD.org>2006-08-26 21:29:10 +0000
commitab6c6e434e4ca0bf593007d49dee6eceb73286c0 (patch)
tree843ffc6140f66bf60562adb1bf8d3d82b9739b5e /contrib/gcc/global.c
parent8a6911d2bb988a943624cbf4e4041b827d9ade53 (diff)
downloadFreeBSD-src-ab6c6e434e4ca0bf593007d49dee6eceb73286c0.zip
FreeBSD-src-ab6c6e434e4ca0bf593007d49dee6eceb73286c0.tar.gz
Gcc 3.4.6 as of 2006/08/25 #116475.
Diffstat (limited to 'contrib/gcc/global.c')
-rw-r--r--contrib/gcc/global.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/contrib/gcc/global.c b/contrib/gcc/global.c
index de765b3..13e41cb 100644
--- a/contrib/gcc/global.c
+++ b/contrib/gcc/global.c
@@ -96,6 +96,9 @@ struct allocno
/* Number of calls crossed by each allocno. */
int calls_crossed;
+ /* Number of calls that might throw crossed by each allocno. */
+ int throwing_calls_crossed;
+
/* Number of refs to each allocno. */
int n_refs;
@@ -469,6 +472,8 @@ global_alloc (FILE *file)
allocno[num].reg = i;
allocno[num].size = PSEUDO_REGNO_SIZE (i);
allocno[num].calls_crossed += REG_N_CALLS_CROSSED (i);
+ allocno[num].throwing_calls_crossed
+ += REG_N_THROWING_CALLS_CROSSED (i);
allocno[num].n_refs += REG_N_REFS (i);
allocno[num].freq += REG_FREQ (i);
if (allocno[num].live_length < REG_LIVE_LENGTH (i))
@@ -1187,9 +1192,11 @@ find_reg (int num, HARD_REG_SET losers, int alt_regs_p, int accept_call_clobbere
{
/* Did not find a register. If it would be profitable to
allocate a call-clobbered register and save and restore it
- around calls, do that. */
+ around calls, do that. Don't do this if it crosses any calls
+ that might throw. */
if (! accept_call_clobbered
&& allocno[num].calls_crossed != 0
+ && allocno[num].throwing_calls_crossed == 0
&& CALLER_SAVE_PROFITABLE (allocno[num].n_refs,
allocno[num].calls_crossed))
{
OpenPOWER on IntegriCloud