public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Remove duplicate DFS walks from DF init
@ 2023-04-20  9:23 Richard Biener
  0 siblings, 0 replies; only message in thread
From: Richard Biener @ 2023-04-20  9:23 UTC (permalink / raw)
  To: gcc-patches

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.

Bootstrapped and tested on x86_64-unknown-linux-gnu for all languages,
pushed.

	* df-core.cc (rest_of_handle_df_initialize): Remove
	computation of df->postorder, df->postorder_inverted and
	df->n_blocks.
---
 gcc/df-core.cc | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/gcc/df-core.cc b/gcc/df-core.cc
index 3286ffda2ce..de5cbd0c622 100644
--- a/gcc/df-core.cc
+++ b/gcc/df-core.cc
@@ -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 ();
-- 
2.35.3

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-04-20  9:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-20  9:23 [PATCH] Remove duplicate DFS walks from DF init Richard Biener

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).