* reload.h (caller_save_initialized_p): Declare.
* toplev.c (backend_init_target): Don't call
init_caller_save but set caller_save_initialized_p
to false.
* caller-save.c (caller_save_initialized_p): Define.
(init_caller_save): Check caller_save_initialized_p.
* ira.c (ira): Call init_caller_save if flag_caller_saves.
testsuite/
PR 43562
* gcc.dg/pr43562.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@157849
138bc75d-0d04-0410-961f-
82ee72b054a4
+2010-03-31 Jie Zhang <jie@codesourcery.com>
+
+ PR 43562
+ * reload.h (caller_save_initialized_p): Declare.
+ * toplev.c (backend_init_target): Don't call
+ init_caller_save but set caller_save_initialized_p
+ to false.
+ * caller-save.c (caller_save_initialized_p): Define.
+ (init_caller_save): Check caller_save_initialized_p.
+ * ira.c (ira): Call init_caller_save if flag_caller_saves.
+
2010-03-30 Alexandre Oliva <aoliva@redhat.com>
PR debug/42977
#include "df.h"
#include "ggc.h"
+/* True if caller-save has been initialized. */
+bool caller_save_initialized_p;
+
/* Call used hard registers which can not be saved because there is no
insn for this. */
HARD_REG_SET no_caller_save_reg_set;
rtx address;
int i, j;
+ if (caller_save_initialized_p)
+ return;
+
+ caller_save_initialized_p = true;
+
CLEAR_HARD_REG_SET (no_caller_save_reg_set);
/* First find all the registers that we need to deal with and all
the modes that they can have. If we can't find a mode to use,
timevar_push (TV_IRA);
+ if (flag_caller_saves)
+ init_caller_save ();
+
if (flag_ira_verbose < 10)
{
internal_flag_ira_verbose = flag_ira_verbose;
/* Deallocate the reload register used by reload number R. */
extern void deallocate_reload_reg (int r);
+/* True if caller-save has been reinitialized. */
+extern bool caller_save_initialized_p;
+
/* Functions in caller-save.c: */
/* Initialize for caller-save. */
+2010-03-31 Jie Zhang <jie@codesourcery.com>
+
+ PR 43562
+ * gcc.dg/pr43562.c: New test.
+
2010-03-30 Jason Merrill <jason@redhat.com>
PR c++/43076
--- /dev/null
+/* { dg-options "-O0" } */
+/* { dg-do compile } */
+
+extern unsigned foo (void);
+extern void bar (void);
+
+__attribute__ ((optimize ("O2")))
+void bak ()
+{
+ unsigned a;
+ while (1)
+ {
+ a = foo ();
+ while (a)
+ {
+ a &= 1;
+ bar ();
+ }
+ }
+}
/* We may need to recompute regno_save_code[] and regno_restore_code[]
after a mode change as well. */
- if (flag_caller_saves)
- init_caller_save ();
+ caller_save_initialized_p = false;
+
expand_dummy_function_end ();
}