This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Don't call init_caller_save if LRA enabled
- From: Kito Cheng <kito dot cheng at gmail dot com>
- To: gcc-patches at gcc dot gnu dot org, Vladimir Makarov <vmakarov at redhat dot com>, rsandifo at linux dot vnet dot ibm dot com
- Date: Thu, 5 Jun 2014 00:31:53 +0800
- Subject: [PATCH] Don't call init_caller_save if LRA enabled
- Authentication-results: sourceware.org; auth=none
LRA generate caller-save register store/restore during split register,
not generate by caller-save.c:save_call_clobbered_regs, so initialize
this module by init_caller_save is meaningless if LRA enabled
2014-06-05 Kito Cheng <kito@0xlab.org>
* ira.c (ira): Don't call init_caller_save if LRA enabled
since LRA use its own infrastructure to handle that.
diff --git a/gcc/ira.c b/gcc/ira.c
index eebd410..5400df4 100644
--- a/gcc/ira.c
+++ b/gcc/ira.c
@@ -5167,7 +5167,8 @@ ira (FILE *f)
#endif
bitmap_obstack_initialize (&ira_bitmap_obstack);
- if (flag_caller_saves)
+ /* LRA use its own infrastructure to handle caller save register. */
+ if (flag_caller_saves && !ira_use_lra_p)
init_caller_save ();
if (flag_ira_verbose < 10)