]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Remove duplicate DFS walks from DF init
authorRichard Biener <rguenther@suse.de>
Mon, 20 Feb 2023 14:02:43 +0000 (15:02 +0100)
committerRichard Biener <rguenther@suse.de>
Thu, 20 Apr 2023 09:22:36 +0000 (11:22 +0200)
The following removes unused CFG order computes from
rest_of_handle_df_initialize.  The CFG orders are computed from df_analyze ().
This also removes code duplication that would have to be kept in sync.

* df-core.cc (rest_of_handle_df_initialize): Remove
computation of df->postorder, df->postorder_inverted and
df->n_blocks.

gcc/df-core.cc

index 3286ffda2ce82f0e0b5a5d5cbcb79fa2c7fad360..de5cbd0c6229835025eb52e6ac6c0ecbee79b4d7 100644 (file)
@@ -701,11 +701,6 @@ rest_of_handle_df_initialize (void)
   if (optimize > 1)
     df_live_add_problem ();
 
-  df->postorder = XNEWVEC (int, last_basic_block_for_fn (cfun));
-  df->n_blocks = post_order_compute (df->postorder, true, true);
-  inverted_post_order_compute (&df->postorder_inverted);
-  gcc_assert ((unsigned) df->n_blocks == df->postorder_inverted.length ());
-
   df->hard_regs_live_count = XCNEWVEC (unsigned int, FIRST_PSEUDO_REGISTER);
 
   df_hard_reg_init ();