From 447f6a7fe8e74964aa7968437e65fa5a4c83f3b5 Mon Sep 17 00:00:00 2001 From: aj Date: Mon, 6 Aug 2001 16:57:53 +0000 Subject: [PATCH] * profile.c (branch_prob): Remove unused variable insn. * Makefile.in (local-alloc.o): Add dependency on except.h. * local-alloc.c: Include except.h for can_throw_internal prototype. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@44665 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 34 +++++++++++++++++++++------------- gcc/Makefile.in | 4 ++-- gcc/local-alloc.c | 3 ++- gcc/profile.c | 21 ++++++++++----------- 4 files changed, 35 insertions(+), 27 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index da7df11..400bf99 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2001-08-06 Andreas Jaeger + + * profile.c (branch_prob): Remove unused variable insn. + + * Makefile.in (local-alloc.o): Add dependency on except.h. + + * local-alloc.c: Include except.h for can_throw_internal prototype. + 2001-08-06 Richard Henderson * config/i386/i386.h (FORCE_PREFERRED_STACK_BOUNDARY_IN_MAIN): New. @@ -17,7 +25,7 @@ * config/rs6000/darwin.h (DOUBLE_INT_ASM_OP): New macro. * config/rs6000/linux.h: Remove vtable thunks stuff we accidently - readded. + readded. * config/rs6000/linux64.h: Ditto. @@ -30,7 +38,7 @@ * config/rs6000/sysv4.h: Move CPP_CPU_SPEC and ASM_CPU_SPEC back to rs6000.h - + 2001-08-05 Richard Henderson * local-alloc.c (update_equiv_regs): Do not move insns that @@ -210,7 +218,7 @@ Sat Aug 4 13:51:36 CEST 2001 Jan Hubicka 2001-08-04 Stephane Carrez - * config/m68hc11/m68hc11.md ("cmphi_1", "cmpqi_1"): Allow memory + * config/m68hc11/m68hc11.md ("cmphi_1", "cmpqi_1"): Allow memory and soft register for operand 0. ("cmphi_z_used", "cmpqi_z_used"): Allow memory for operand 0. @@ -227,7 +235,7 @@ Sat Aug 4 13:51:36 CEST 2001 Jan Hubicka 2001-08-03 Zack Weinberg - * sparc-protos.h: Add prototypes for fp_zero_operand and + * sparc-protos.h: Add prototypes for fp_zero_operand and reg_or_0_operand. * sh-protos.h: Add prototype for fpul_operand. @@ -237,7 +245,7 @@ Sat Aug 4 13:51:36 CEST 2001 Jan Hubicka 2001-08-03 Richard Henderson - * target.h (gcc_target): Add asm_out.named_section, + * target.h (gcc_target): Add asm_out.named_section, section_type_flags, have_named_sections. * target-def.h (TARGET_ASM_NAMED_SECTION): New. (TARGET_HAVE_NAMED_SECTIONS): New. @@ -287,7 +295,7 @@ Sat Aug 4 13:51:36 CEST 2001 Jan Hubicka * config/ia64/sysv4.h, config/mcore/mcore-pe.h: Likewise. * config/mips/elf.h, config/mips/elf64.h: Likewise. * config/mips/iris6gld.h, config/mips/mips.h: Likewise. - * config/pa/pa64-hpux.h, + * config/pa/pa64-hpux.h, * config/elfos.h (ASM_OUTPUT_SECTION_NAME): Remove. (TARGET_ASM_NAMED_SECTION): New. @@ -383,7 +391,7 @@ Sat Aug 4 13:51:36 CEST 2001 Jan Hubicka (__gthread_mutex_init_function): New function for mutex initialization. 2001-08-03 Daniel Berlin - + * Makefile.in: Revert screwed up commit. 2001-08-03 Stephane Carrez @@ -403,9 +411,9 @@ Sat Aug 4 13:51:36 CEST 2001 Jan Hubicka (DTORS_SECTION_FUNCTION): Likewise for __do_global_dtors. 2001-08-03 Daniel Berlin - + * ChangeLog: Fix date on previous ChangeLog entry for GCSE. - + * Makefile.in: Add df.h to gcse.c dependencies. 2001-08-03 John David Anglin @@ -433,7 +441,7 @@ Sat Aug 4 13:51:36 CEST 2001 Jan Hubicka the answer, and just want to know if the store itself was killed. (build_store_vector): Largely rewritten to calculate the various vectors properly, and somewhat optimized. - (store_motion): Init the df_analyzer, get REG_DEF chains. + (store_motion): Init the df_analyzer, get REG_DEF chains. Also handle trapping expressions (since mems almost always trap) (simple_mem): Redefine what a simple mem is. @@ -453,7 +461,7 @@ Sat Aug 4 13:51:36 CEST 2001 Jan Hubicka * doc/install.texi (Configuration): Fix markup. (Specific, i?86-*-udk): Likewise. (Specific, alpha*-dec-osf*): Warn against --with-gnu-as, - --with-gnu-ld. + --with-gnu-ld. Document --enable-threads and --enable-libgcj status. (Specific, mips-sgi-irix*): Canonicalize triples. (Specific, mips-sgi-irix5): Warn about problems with this config. @@ -635,7 +643,7 @@ Sat Aug 4 13:51:36 CEST 2001 Jan Hubicka 2001-07-11 Andrew Cagney * config.gcc: Recognize powerpc-*-netbsd*. - + * doc/install.texi (Host/target specific installation notes for GCC): Mention powerpc-*-netbsd*. @@ -651,7 +659,7 @@ Sat Aug 4 13:51:36 CEST 2001 Jan Hubicka (EXTRA_MULTILIB_PARTS): Add ncrti$(objext) and ncrtn$(objext). (ncrti.S, ncrtn.S): New targets. ($(T)ncrti$(objext), $(T)ncrtn$(objext)): New targets. - + * config/rs6000/sysv4.h (SUBTARGET_OVERRIDE_OPTIONS): Recognize "netbsd' as a V4 ABI. (ASM_SPEC): Check for -mcall-netbsd. diff --git a/gcc/Makefile.in b/gcc/Makefile.in index 48dbd57..6db8ae1 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -794,7 +794,7 @@ LIB2FUNCS = _muldi3 _negdi2 _lshrdi3 _ashldi3 _ashrdi3 _ffsdi2 _clz \ _mulvsi3 _mulvdi3 _negvsi2 _negvdi2 _ctors # Defined in libgcc2.c, included only in the static library. -LIB2FUNCS_ST = _eprintf _bb __gcc_bcmp +LIB2FUNCS_ST = _eprintf _bb __gcc_bcmp FPBIT_FUNCS = _pack_sf _unpack_sf _addsub_sf _mul_sf _div_sf \ _fpcmp_parts_sf _compare_sf _eq_sf _ne_sf _gt_sf _ge_sf \ @@ -1496,7 +1496,7 @@ regclass.o : regclass.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) hard-reg-set.h flags.h toplev.h function.h output.h $(GGC_H) $(TM_P_H) $(EXPR_H) local-alloc.o : local-alloc.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) flags.h \ $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h insn-config.h $(RECOG_H) \ - output.h function.h $(INSN_ATTR_H) toplev.h $(TM_P_H) + output.h function.h $(INSN_ATTR_H) toplev.h except.h $(TM_P_H) bitmap.o : bitmap.c $(GCONFIG_H) $(SYSTEM_H) $(RTL_H) flags.h $(BASIC_BLOCK_H) \ $(REGS_H) $(CC) -c $(ALL_CFLAGS) -DGENERATOR_FILE $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION) diff --git a/gcc/local-alloc.c b/gcc/local-alloc.c index c987190..efc3159 100644 --- a/gcc/local-alloc.c +++ b/gcc/local-alloc.c @@ -1,6 +1,6 @@ /* Allocate registers within a basic block, for GNU compiler. Copyright (C) 1987, 1988, 1991, 1993, 1994, 1995, 1996, 1997, 1998, - 1999, 2000 Free Software Foundation, Inc. + 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of GNU CC. @@ -73,6 +73,7 @@ Boston, MA 02111-1307, USA. */ #include "recog.h" #include "output.h" #include "toplev.h" +#include "except.h" /* Next quantity number available for allocation. */ diff --git a/gcc/profile.c b/gcc/profile.c index 1335e9c..b3ecf4c 100644 --- a/gcc/profile.c +++ b/gcc/profile.c @@ -1,4 +1,4 @@ -/* Calculate branch probabilities, and basic block execution counts. +/* Calculate branch probabilities, and basic block execution counts. Copyright (C) 1990, 1991, 1992, 1993, 1994, 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. Contributed by James E. Wilson, UC Berkeley/Cygnus Support; @@ -69,10 +69,10 @@ struct bb_info /* Keep all basic block indexes nonnegative in the gcov output. Index 0 is used for entry block, last block exit block. */ #define GCOV_INDEX_TO_BB(i) ((i) == 0 ? ENTRY_BLOCK_PTR \ - : (((i) == n_basic_blocks + 1) \ + : (((i) == n_basic_blocks + 1) \ ? EXIT_BLOCK_PTR : BASIC_BLOCK ((i)-1))) -#define BB_TO_GCOV_INDEX(bb) ((bb) == ENTRY_BLOCK_PTR ? 0 \ - : ((bb) == EXIT_BLOCK_PTR \ +#define BB_TO_GCOV_INDEX(bb) ((bb) == ENTRY_BLOCK_PTR ? 0 \ + : ((bb) == EXIT_BLOCK_PTR \ ? n_basic_blocks + 1 : (bb)->index + 1)) /* Name and file pointer of the output file for the basic block graph. */ @@ -179,7 +179,7 @@ output_gcov_string (string, delimiter) long delimiter; { long temp; - + /* Write a delimiter to indicate that a file name follows. */ __write_long (delimiter, bb_file, 4); @@ -355,7 +355,7 @@ compute_branch_probabilities () EDGE_INFO (e)->count_valid = 1; e->count = total; bi->succ_count--; - + BB_INFO (e->dest)->pred_count--; changes = 1; } @@ -382,7 +382,7 @@ compute_branch_probabilities () EDGE_INFO (e)->count_valid = 1; e->count = total; bi->pred_count--; - + BB_INFO (e->src)->succ_count--; changes = 1; } @@ -455,7 +455,7 @@ compute_branch_probabilities () prob = e->probability; index = prob * 20 / REG_BR_PROB_BASE; - + if (index == 20) index = 19; hist_br_prob[index]++; @@ -471,7 +471,7 @@ compute_branch_probabilities () REG_NOTES (bb->end)); } num_branches++; - + } } @@ -535,13 +535,12 @@ branch_prob () edge from entry node and every destination by fake edge to exit. This keeps graph acyclic and our calculation exact for all normal edges except for exit and entrance ones. - + We also add fake exit edges for each call and asm statement in the basic, since it may not return. */ for (i = 0; i < n_basic_blocks ; i++) { - rtx insn; int need_exit_edge = 0, need_entry_edge = 0; int have_exit_edge = 0, have_entry_edge = 0; basic_block bb = BASIC_BLOCK (i); -- 2.7.4