This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Don't call init_caller_save if LRA enabled


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)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]