diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5dbd9a695dc..62f07341c11 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Tue Dec 14 13:51:38 MET 1999 Jan Hubicka + + * regclass.c (scan_one_insn): Set loop_cost to 1 when + optimizing for size. + 1999-12-14 Bernd Schmidt * reload1.c (reload): Can't avoid select_reload_regs/finish_spills diff --git a/gcc/regclass.c b/gcc/regclass.c index a67d91e100b..e8eca4de2fc 100644 --- a/gcc/regclass.c +++ b/gcc/regclass.c @@ -829,9 +829,14 @@ scan_one_insn (insn, pass) if (code == NOTE) { if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_LOOP_BEG) - loop_depth++, loop_cost = 1 << (2 * MIN (loop_depth, 5)); + loop_depth++; else if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_LOOP_END) - loop_depth--, loop_cost = 1 << (2 * MIN (loop_depth, 5)); + loop_depth--; + + if (optimize_size) + loop_cost = 1; + else + loop_cost = 1 << (2 * MIN (loop_depth, 5)); return insn; }