diff options
author | jiez <jiez@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-03-31 02:44:10 +0000 |
---|---|---|
committer | jiez <jiez@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-03-31 02:44:10 +0000 |
commit | 4e4c89ecdf082d0ea8a21af9c78b969a989cf62d (patch) | |
tree | bdc83c7c76ffc03569d38f8626f441aecbd9e452 /gcc/caller-save.c | |
parent | 5632bff570a3489804e448af25abf1db374c6762 (diff) | |
download | gcc-4e4c89ecdf082d0ea8a21af9c78b969a989cf62d.tar.gz |
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: svn+ssh://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.c | 8 |
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, |