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]

[PING][PATCH] LRA: check_rtl modifies RTL instruction stream


Hi,

I'm pinging for the review of a patch.

Original post: http://gcc.gnu.org/ml/gcc-patches/2013-11/msg01608.html

The attached patch is slightly modified as the indentation was incorrect
and realised that after sending the email last time.

If the patch is OK, could someone commit the patch? I do not have 
permission to do so.

Regards,
Robert

2013-11-13  Robert Suchanek  <Robert.Suchanek@imgtec.com>
    
    	* lra.c (lra): Set lra_in_progress before check_rtl call.
    	* recog.c (insn_invalid_p): Add !lra_in_progress to prevent
    	adding clobber regs when LRA is running

diff --git a/gcc/lra.c b/gcc/lra.c
index 1aea599..83d45b6 100644
--- a/gcc/lra.c
+++ b/gcc/lra.c
@@ -2238,6 +2238,10 @@ lra (FILE *f)
 
   init_insn_recog_data ();
 
+  /* We can not set up reload_in_progress because it prevents new
+     pseudo creation.  */
+  lra_in_progress = 1;
+
 #ifdef ENABLE_CHECKING
   check_rtl (false);
 #endif
@@ -2248,10 +2252,6 @@ lra (FILE *f)
 
   setup_reg_spill_flag ();
 
-  /* We can not set up reload_in_progress because it prevents new
-     pseudo creation.  */
-  lra_in_progress = 1;
-
   /* Function remove_scratches can creates new pseudos for clobbers --
      so set up lra_constraint_new_regno_start before its call to
      permit changing reg classes for pseudos created by this
diff --git a/gcc/recog.c b/gcc/recog.c
index c8594bb..5c0ec16 100644
--- a/gcc/recog.c
+++ b/gcc/recog.c
@@ -314,7 +314,9 @@ insn_invalid_p (rtx insn, bool in_group)
      clobbers.  */
   int icode = recog (pat, insn,
 		     (GET_CODE (pat) == SET
-		      && ! reload_completed && ! reload_in_progress)
+		      && ! reload_completed 
+		      && ! reload_in_progress
+		      && ! lra_in_progress)
 		     ? &num_clobbers : 0);
   int is_asm = icode < 0 && asm_noperands (PATTERN (insn)) >= 0;


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