+2000-02-13 Zack Weinberg <zack@wolery.cumb.org>
+
+ * cse.c (cse_altered): New internal flag.
+ (cse_insn): Set it if we changed an insn.
+ (cse_main): Clear cse_altered before each basic block.
+ Only garbage collect if cse_altered is true afterward.
+
Sun Feb 13 14:12:28 2000 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* sparc/sol2.h (LIB_SPEC): Link -ldl if profiling.
#define INSN_CUID(INSN) (uid_cuid[INSN_UID (INSN)])
+/* Nonzero if this pass has made changes, and therefore it's
+ worthwhile to run the garbage collector. */
+
+static int cse_altered;
+
/* Nonzero if cse has altered conditional jump insns
in such a way that jump optimization should be redone. */
/* If we made a change, recompute SRC values. */
if (src != sets[i].src)
{
+ cse_altered = 1;
do_not_record = 0;
hash_arg_in_memory = 0;
sets[i].src = src;
insn = f;
while (insn)
{
+ cse_altered = 0;
cse_end_of_basic_block (insn, &val, flag_cse_follow_jumps, after_loop,
flag_cse_skip_blocks);
cse_jumps_altered |= old_cse_jumps_altered;
}
- if (ggc_p)
+ if (ggc_p && cse_altered)
ggc_collect ();
#ifdef USE_C_ALLOCA