Patchwork patch to improve register preferencing in IRA and to *remove regmove* pass

login
register
mail settings
Submitter Steven Bosscher
Date Oct. 30, 2013, 10:50 p.m.
Message ID <CABu31nP9M2mYRozippetLWE4o0NcySBZQbLAJbuEDnbj2WxnHg@mail.gmail.com>
Download mbox | patch
Permalink /patch/287360/
State New
Headers show

Comments

Steven Bosscher - Oct. 30, 2013, 10:50 p.m.
On Tue, Oct 29, 2013 at 4:12 PM, Vladimir Makarov wrote:
>   Tomorrow I'd like commit the following patch.
>
>   The patch removes regmove pass.

I can barely hold my tears... of joy :-)

Attached patch cleans up some left-overs. Nothing to test, really, as
it's just comments and NOPs. OK for trunk?

Ciao!
Steven
* gcse.c (pre_delete): Remove references to regmove from comments.
	* recog.c: (validate_replace_rtx_1): Likewise.
	* config/rl78/rl78.c: Likewise.
	* config/v850/v850.h: Likewise, and remove unused ENABLE_REGMOVE_PASS.
	* common/config/m32r/m32r-common.c: Don't manipulate OPT_fregmove.
	* common/config/mmix/mmix-common.c: Likewise.
Marc Glisse - Oct. 30, 2013, 11:06 p.m.
On Wed, 30 Oct 2013, Steven Bosscher wrote:

> Attached patch cleans up some left-overs. Nothing to test, really, as
> it's just comments and NOPs. OK for trunk?

> -would be better to run a full CSE/propogation pass on it through, or
> -re-run regmove, but that has not yet been attempted.
> +would be better to run a full CSE/propogation pass on it through, bu
> +but that has not yet been attempted.

bu?
through -> though?
Vladimir Makarov - Oct. 31, 2013, 3:01 a.m.
On 10/30/2013, 6:50 PM, Steven Bosscher wrote:
> On Tue, Oct 29, 2013 at 4:12 PM, Vladimir Makarov wrote:
>>    Tomorrow I'd like commit the following patch.
>>
>>    The patch removes regmove pass.
> I can barely hold my tears... of joy :-)
>
> Attached patch cleans up some left-overs. Nothing to test, really, as
> it's just comments and NOPs. OK for trunk?
>
>
Yes, sure.  Sorry, I missed this.  Am not a target maintainer but the 
changes are pretty obvious.  Thanks, Steven.
Jeff Law - Oct. 31, 2013, 4:58 a.m.
On 10/30/13 16:50, Steven Bosscher wrote:
> On Tue, Oct 29, 2013 at 4:12 PM, Vladimir Makarov wrote:
>>    Tomorrow I'd like commit the following patch.
>>
>>    The patch removes regmove pass.
>
> I can barely hold my tears... of joy :-)
>
> Attached patch cleans up some left-overs. Nothing to test, really, as
> it's just comments and NOPs. OK for trunk?
Of course.

jeff

Patch

Index: gcse.c
===================================================================
--- gcse.c	(revision 204231)
+++ gcse.c	(working copy)
@@ -2535,7 +2535,7 @@  gcse_emit_move_after (rtx dest, rtx src, rtx insn)
 /* Delete redundant computations.
    Deletion is done by changing the insn to copy the `reaching_reg' of
    the expression into the result of the SET.  It is left to later passes
-   (cprop, cse2, flow, combine, regmove) to propagate the copy or eliminate it.
+   to propagate the copy or eliminate it.
 
    Return nonzero if a change is made.  */
 
Index: recog.c
===================================================================
--- recog.c	(revision 204231)
+++ recog.c	(working copy)
@@ -726,7 +726,7 @@  validate_replace_rtx_1 (rtx *loc, rtx from, rtx to
   /* Call ourself recursively to perform the replacements.
      We must not replace inside already replaced expression, otherwise we
      get infinite recursion for replacements like (reg X)->(subreg (reg X))
-     done by regmove, so we must special case shared ASM_OPERANDS.  */
+     so we must special case shared ASM_OPERANDS.  */
 
   if (GET_CODE (x) == PARALLEL)
     {
@@ -762,6 +762,7 @@  validate_replace_rtx_1 (rtx *loc, rtx from, rtx to
   if (num_changes == prev_changes)
     return;
 
+  /* ??? The regmove is no more, so is this aberration still necessary?  */
   /* Allow substituted expression to have different mode.  This is used by
      regmove to change mode of pseudo register.  */
   if (fmt[0] == 'e' && GET_MODE (XEXP (x, 0)) != VOIDmode)
Index: config/rl78/rl78.c
===================================================================
--- config/rl78/rl78.c	(revision 204231)
+++ config/rl78/rl78.c	(working copy)
@@ -1894,8 +1894,8 @@  post-reload optimizers could operate on the real r
 tried that there were some issues building the target libraries.
 
 During devirtualization, a simple register move optimizer is run.  It
-would be better to run a full CSE/propogation pass on it through, or
-re-run regmove, but that has not yet been attempted.
+would be better to run a full CSE/propogation pass on it through, bu
+but that has not yet been attempted.
 
  */
 #define DEBUG_ALLOC 0
Index: config/v850/v850.h
===================================================================
--- config/v850/v850.h	(revision 204231)
+++ config/v850/v850.h	(working copy)
@@ -954,10 +954,6 @@  extern tree GHS_current_section_names [(int) COUNT
 
 #define FILE_ASM_OP "\t.file\n"
 
-/* Enable the register move pass to improve code.  */
-#define ENABLE_REGMOVE_PASS
-
-
 /* Implement ZDA, TDA, and SDA */
 
 #define EP_REGNUM 30	/* ep register number */
Index: common/config/m32r/m32r-common.c
===================================================================
--- common/config/m32r/m32r-common.c	(revision 204231)
+++ common/config/m32r/m32r-common.c	(working copy)
@@ -29,7 +29,6 @@ 
 static const struct default_options m32r_option_optimization_table[] =
   {
     { OPT_LEVELS_1_PLUS, OPT_fomit_frame_pointer, NULL, 1 },
-    { OPT_LEVELS_1_PLUS, OPT_fregmove, NULL, 1 },
     { OPT_LEVELS_NONE, 0, NULL, 0 }
   };
 
Index: common/config/mmix/mmix-common.c
===================================================================
--- common/config/mmix/mmix-common.c	(revision 204231)
+++ common/config/mmix/mmix-common.c	(working copy)
@@ -28,7 +28,6 @@  along with GCC; see the file COPYING3.  If not see
 
 static const struct default_options mmix_option_optimization_table[] =
   {
-    { OPT_LEVELS_1_PLUS, OPT_fregmove, NULL, 1 },
     { OPT_LEVELS_2_PLUS, OPT_fomit_frame_pointer, NULL, 1 },
     { OPT_LEVELS_NONE, 0, NULL, 0 }
   };