[committed] Rename PROP_trees to PROP_gimple

Jakub Jelinek jakub@redhat.com
Wed Jan 27 09:14:47 GMT 2021


On Tue, Jan 26, 2021 at 12:25:16PM +0100, Richard Biener wrote:
> On Tue, 26 Jan 2021, Jakub Jelinek wrote:
> 
> > On Tue, Jan 26, 2021 at 12:16:14PM +0100, Richard Biener wrote:
> > > > +      /* Unless this is called during FE folding.  */
> > > > +      if (cfun
> > > > +	  && (cfun->curr_properties & (PROP_trees | PROP_rtl)) == 0
> > > 
> > > don't you want && (cfun->curr_properties & PROP_trees) != 0?
> > 
> > No, PROP_trees is misnamed and it actually means GIMPLE.
> 
> Doh.  Patch doing s/PROP_trees/PROP_gimple/ pre-approved ;)

Here is what I've committed after bootstrapping/regtesting it on
x86_64-linux and i686-linux:

2021-01-27  Jakub Jelinek  <jakub@redhat.com>

	* tree-pass.h (PROP_trees): Rename to ...
	(PROP_gimple): ... this.
	* cfgexpand.c (pass_data_expand): Replace PROP_trees with PROP_gimple.
	* passes.c (execute_function_dump, execute_function_todo,
	execute_one_ipa_transform_pass, execute_one_pass): Likewise.
	* varpool.c (ctor_for_folding): Likewise.

--- gcc/tree-pass.h.jj	2021-01-04 10:25:37.702246631 +0100
+++ gcc/tree-pass.h	2021-01-26 12:35:54.336577674 +0100
@@ -225,7 +225,7 @@ protected:
 #define PROP_gimple_lomp_dev	(1 << 16)	/* done omp_device_lower */
 #define PROP_rtl_split_insns	(1 << 17)	/* RTL has insns split.  */
 
-#define PROP_trees \
+#define PROP_gimple \
   (PROP_gimple_any | PROP_gimple_lcf | PROP_gimple_leh | PROP_gimple_lomp)
 
 /* To-do flags.  */
--- gcc/cfgexpand.c.jj	2021-01-05 19:13:20.573245780 +0100
+++ gcc/cfgexpand.c	2021-01-26 12:34:37.033460746 +0100
@@ -6503,7 +6503,7 @@ const pass_data pass_data_expand =
     | PROP_gimple_lvec
     | PROP_gimple_lva), /* properties_required */
   PROP_rtl, /* properties_provided */
-  ( PROP_ssa | PROP_trees ), /* properties_destroyed */
+  ( PROP_ssa | PROP_gimple ), /* properties_destroyed */
   0, /* todo_flags_start */
   0, /* todo_flags_finish */
 };
--- gcc/passes.c.jj	2021-01-04 10:25:37.289251307 +0100
+++ gcc/passes.c	2021-01-26 12:35:04.595145895 +0100
@@ -1793,7 +1793,7 @@ execute_function_dump (function *fn, voi
     {
       push_cfun (fn);
 
-      if (fn->curr_properties & PROP_trees)
+      if (fn->curr_properties & PROP_gimple)
         dump_function_to_file (fn->decl, dump_file, dump_flags);
       else
 	print_rtl_with_bb (dump_file, get_insns (), dump_flags);
@@ -2034,7 +2034,7 @@ execute_function_todo (function *fn, voi
 
       if (flags & TODO_verify_il)
 	{
-	  if (cfun->curr_properties & PROP_trees)
+	  if (cfun->curr_properties & PROP_gimple)
 	    {
 	      if (cfun->curr_properties & PROP_cfg)
 		/* IPA passes leave stmts to be fixed up, so make sure to
@@ -2272,7 +2272,7 @@ execute_one_ipa_transform_pass (struct c
 
   /* Note that the folders should only create gimple expressions.
      This is a hack until the new folder is ready.  */
-  in_gimple_form = (cfun && (cfun->curr_properties & PROP_trees)) != 0;
+  in_gimple_form = (cfun && (cfun->curr_properties & PROP_gimple)) != 0;
 
   pass_init_dump_file (pass);
 
@@ -2545,7 +2545,7 @@ execute_one_pass (opt_pass *pass)
 
   /* Note that the folders should only create gimple expressions.
      This is a hack until the new folder is ready.  */
-  in_gimple_form = (cfun && (cfun->curr_properties & PROP_trees)) != 0;
+  in_gimple_form = (cfun && (cfun->curr_properties & PROP_gimple)) != 0;
 
   pass_init_dump_file (pass);
 
@@ -2628,7 +2628,7 @@ execute_one_pass (opt_pass *pass)
   pass_fini_dump_file (pass);
 
   if (pass->type != SIMPLE_IPA_PASS && pass->type != IPA_PASS)
-    gcc_assert (!(cfun->curr_properties & PROP_trees)
+    gcc_assert (!(cfun->curr_properties & PROP_gimple)
 		|| pass->type != RTL_PASS);
 
   current_pass = NULL;
--- gcc/varpool.c.jj	2021-01-26 11:36:46.081295478 +0100
+++ gcc/varpool.c	2021-01-26 12:36:13.989353173 +0100
@@ -415,7 +415,7 @@ ctor_for_folding (tree decl)
       gcc_assert (!TREE_PUBLIC (decl));
       /* Unless this is called during FE folding.  */
       if (cfun
-	  && (cfun->curr_properties & (PROP_trees | PROP_rtl)) == 0
+	  && (cfun->curr_properties & (PROP_gimple | PROP_rtl)) == 0
 	  && TREE_READONLY (decl)
 	  && !TREE_SIDE_EFFECTS (decl)
 	  && DECL_INITIAL (decl))


	Jakub



More information about the Gcc-patches mailing list