]> gcc.gnu.org Git - gcc.git/commitdiff
refactor SSA rewriting timevars
authorRichard Biener <rguenther@suse.de>
Thu, 6 May 2021 09:17:58 +0000 (11:17 +0200)
committerRichard Biener <rguenther@suse.de>
Thu, 6 May 2021 12:52:02 +0000 (14:52 +0200)
This avoids too deep stacks of timevars during incremental
SSA rewrite and basically use TV_TREE_INTO_SSA for all into-SSA
rewrite work and TV_TREE_SSA_INCREMENTAL for update_ssa.

2021-05-06  Richard Biener  <rguenther@suse.de>

* timevar.def (TV_TREE_INSERT_PHI_NODES): Remove.
(TV_TREE_SSA_REWRITE_BLOCKS): Likewise.
(TV_TREE_INTO_SSA): New.
* tree-into-ssa.c (insert_phi_nodes): Do not account separately.
(rewrite_blocks): Likewise.
(pass_data_build_ssa): Account to TV_TREE_INTO_SSA.

gcc/timevar.def
gcc/tree-into-ssa.c

index 63c0b3306de8668048d13bed3bdbe43ed74a7c69..16d1657436c53d3c28b732e971a498c77ff419ad 100644 (file)
@@ -162,9 +162,8 @@ DEFTIMEVAR (TV_TREE_EARLY_VRP        , "tree Early VRP")
 DEFTIMEVAR (TV_TREE_COPY_PROP        , "tree copy propagation")
 DEFTIMEVAR (TV_FIND_REFERENCED_VARS  , "tree find ref. vars")
 DEFTIMEVAR (TV_TREE_PTA                     , "tree PTA")
-DEFTIMEVAR (TV_TREE_INSERT_PHI_NODES , "tree PHI insertion")
-DEFTIMEVAR (TV_TREE_SSA_REWRITE_BLOCKS, "tree SSA rewrite")
 DEFTIMEVAR (TV_TREE_SSA_OTHER       , "tree SSA other")
+DEFTIMEVAR (TV_TREE_INTO_SSA        , "tree SSA rewrite")
 DEFTIMEVAR (TV_TREE_SSA_INCREMENTAL  , "tree SSA incremental")
 DEFTIMEVAR (TV_TREE_OPS                     , "tree operand scan")
 DEFTIMEVAR (TV_TREE_SSA_DOMINATOR_OPTS   , "dominator optimization")
index ef99060403039082435c0a6fc6d8922e3b375237..85adb1ad8c7e71f1fcbef3ed6d42fbd487a82ac6 100644 (file)
@@ -1071,8 +1071,6 @@ insert_phi_nodes (bitmap_head *dfs)
   unsigned i;
   var_info *info;
 
-  timevar_push (TV_TREE_INSERT_PHI_NODES);
-
   /* When the gimplifier introduces SSA names it cannot easily avoid
      situations where abnormal edges added by CFG construction break
      the use-def dominance requirement.  For this case rewrite SSA
@@ -1141,8 +1139,6 @@ insert_phi_nodes (bitmap_head *dfs)
       insert_phi_nodes_for (info->var, idf, false);
       BITMAP_FREE (idf);
     }
-
-  timevar_pop (TV_TREE_INSERT_PHI_NODES);
 }
 
 
@@ -2282,9 +2278,6 @@ rewrite_update_dom_walker::after_dom_children (basic_block bb ATTRIBUTE_UNUSED)
 static void
 rewrite_blocks (basic_block entry, enum rewrite_mode what)
 {
-  /* Rewrite all the basic blocks in the program.  */
-  timevar_push (TV_TREE_SSA_REWRITE_BLOCKS);
-
   block_defs_stack.create (10);
 
   /* Recursively walk the dominator tree rewriting each statement in
@@ -2305,8 +2298,6 @@ rewrite_blocks (basic_block entry, enum rewrite_mode what)
     }
 
   block_defs_stack.release ();
-
-  timevar_pop (TV_TREE_SSA_REWRITE_BLOCKS);
 }
 
 class mark_def_dom_walker : public dom_walker
@@ -2402,7 +2393,7 @@ const pass_data pass_data_build_ssa =
   GIMPLE_PASS, /* type */
   "ssa", /* name */
   OPTGROUP_NONE, /* optinfo_flags */
-  TV_TREE_SSA_OTHER, /* tv_id */
+  TV_TREE_INTO_SSA, /* tv_id */
   PROP_cfg, /* properties_required */
   PROP_ssa, /* properties_provided */
   0, /* properties_destroyed */
This page took 0.074275 seconds and 5 git commands to generate.