aboutsummaryrefslogtreecommitdiff
path: root/gcc/caller-save.c
diff options
context:
space:
mode:
authorJie Zhang <jie@codesourcery.com>2010-03-31 02:44:10 +0000
committerJie Zhang <jie@codesourcery.com>2010-03-31 02:44:10 +0000
commit2690f15b56f174a32d852d23c0c50899eac866a7 (patch)
treebdc83c7c76ffc03569d38f8626f441aecbd9e452 /gcc/caller-save.c
parent2528e0949212aaea2178e3bc1f78dd16dc646b34 (diff)
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. testsuite/ PR 43562 * gcc.dg/pr43562.c: New test. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@157849 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/caller-save.c')
-rw-r--r--gcc/caller-save.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/caller-save.c b/gcc/caller-save.c
index dbfd42aa793..7a00dbd72ae 100644
--- a/gcc/caller-save.c
+++ b/gcc/caller-save.c
@@ -40,6 +40,9 @@ along with GCC; see the file COPYING3. If not see
#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;
@@ -208,6 +211,11 @@ init_caller_save (void)
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,