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] Do not include gimple.h in front-end file c-decl.c


Hi,

As it turns out, c-decl.c doesn't need to copy GIMPLE bodies anymore,
since gimplifications happens unit-at-a-time now, and pushdecl is
never called for GIMPLE functions after that.

Bootstrapped&tested on x86_64-unknown-linux-gnu. More importantly:
Tested a different patch that had "gcc_assert (! gimple_body
(...decl))" instead of the gimple_set_body calls. Just to make
absolutely sure there really never is a GIMPLE body.

OK for trunk?

Ciao!
Steven


	* c-decl.c: Don't include gimple.h.
	(merge_decls): Do not copy gimple_body.

Index: c-decl.c
===================================================================
--- c-decl.c	(revision 159442)
+++ c-decl.c	(working copy)
@@ -51,7 +51,6 @@ along with GCC; see the file COPYING3.
 #include "c-lang.h"
 #include "langhooks.h"
 #include "tree-mudflap.h"
-#include "gimple.h" /* FIXME: For gimple_set_body and gimple_body, but why?  */
 #include "tree-iterator.h"
 #include "diagnostic.h"
 #include "tree-dump.h"
@@ -2370,7 +2369,6 @@ merge_decls (tree newdecl, tree olddecl,
 	  DECL_INITIAL (newdecl) = DECL_INITIAL (olddecl);
 	  DECL_STRUCT_FUNCTION (newdecl) = DECL_STRUCT_FUNCTION (olddecl);
 	  DECL_SAVED_TREE (newdecl) = DECL_SAVED_TREE (olddecl);
-	  gimple_set_body (newdecl, gimple_body (olddecl));
 	  DECL_ARGUMENTS (newdecl) = copy_list (DECL_ARGUMENTS (olddecl));
 	  for (t = DECL_ARGUMENTS (newdecl); t ; t = TREE_CHAIN (t))
 	    DECL_CONTEXT (t) = newdecl;
@@ -2412,9 +2410,6 @@ merge_decls (tree newdecl, tree olddecl,
     switch (TREE_CODE (olddecl))
       {
       case FUNCTION_DECL:
-	gimple_set_body (olddecl, gimple_body (newdecl));
-	/* fall through */
-
       case FIELD_DECL:
       case VAR_DECL:
       case PARM_DECL:


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