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]

Re: [tuples] Rename gs_*


On 7/16/07 9:51 PM, Christopher Matthews wrote:

> @@ -111,33 +111,33 @@ typedef enum fallback_t {
>  } fallback_t;
>  
>  enum gimplify_status {
> -  GS_ERROR	= -2,	/* Something Bad Seen.  */
> -  GS_UNHANDLED	= -1,	/* A langhook result for "I dunno".  */
> -  GS_OK		= 0,	/* We did something, maybe more to do.  */
> -  GS_ALL_DONE	= 1	/* The expression is fully gimplified.  */
> +  GIMPLE_ERROR	= -2,	/* Something Bad Seen.  */
> +  GIMPLE_UNHANDLED	= -1,	/* A langhook result for "I dunno".  */
> +  GIMPLE_OK		= 0,	/* We did something, maybe more to do.  */
> +  GIMPLE_ALL_DONE	= 1	/* The expression is fully gimplified.  */
>  };

Actually, for gimplify_status, we do not want to rename GS->GIMPLE.
This one is my fault, I totally forgot about it, sorry.  In this case,
GS stands for "Gimplifier Status", not "GIMPLE Statement".  So, all the
values in gimplify_status should start with 'GS_'.


> Index: gcc/gimple.def
> ===================================================================
> --- gcc/gimple.def	(revision 126694)
> +++ gcc/gimple.def	(working copy)
> @@ -1,13 +1,13 @@
>  /* This file contains the definitions in the gimple IR tuples used in GCC.
>  
> -   Copyright (GS_C) 2007 Free Software Foundation, Inc.
> +   Copyright (GIMPLE_C) 2007 Free Software Foundation, Inc.
>     Contributed by Aldy Hernandez <aldyh@redhat.com>
>  
>  This file is part of GCC.
>  
>  GCC is free software; you can redistribute it and/or modify it under
>  the terms of the GNU General Public License as published by the Free
> -Software Foundation; either version 2, or (GS_at your option) any later
> +Software Foundation; either version 2, or (GIMPLE_at your option) any later
>  version.
>  
>  GCC is distributed in the hope that it will be useful, but WITHOUT ANY

I doubt you wanted to change this, but I can see why that happened.  I
wonder what was that GS_ string doing in the copyright header to begin with.

> --- gcc/testsuite/ChangeLog.tuples	(revision 126694)
> +++ gcc/testsuite/ChangeLog.tuples	(working copy)
> @@ -1,5 +1,18 @@
>  2007-07-16  Chris Matthews  <chrismatthews@google.com>
>  
> +	* gs_assign.c: Renamed.
> +	* gs_bind.c: Renamed.
> +	* gs_call.c: Renamed.
> +	* gs_cond.c: Renamed.
> +	* gs_goto.c: Renamed.
> +	* gs_return.c: Renamed.
> +	* gs_switch.c: Renamed.
> +	* gs_switch2.c: Renamed.
> +	* gs_switch3.c: Renamed.
> +	* with_size_expr.c: GS_ renamed to GIMPLE_.

The entries need to mention the new names.  Something like:

	* gimple_assign.c: Renamed from gs_assign.c

The rest looks fine, thanks for the quick turnaround!  It's not really
necessary to mention all the files and functions you changed in these
massive renames.  It's sufficient to mention the rename at the point of
the definition and then say "Update all users."  So:

	* gimple.def (GIMPLE_ASSIGN): Rename from GS_ASSIGN.
	Update all users.
	...


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