public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Marking SCCs in ipa_reduced_postorder
@ 2011-05-12 20:00 Martin Jambor
  0 siblings, 0 replies; only message in thread
From: Martin Jambor @ 2011-05-12 20:00 UTC (permalink / raw)
  To: GCC Patches; +Cc: Jan Hubicka

Hi,

in my current efforts to enhance IPA-CP I propagate values in a single
pass over the call graph nodes in the topological order and only
resort to "propagation until no change" in SCCs.

In order to do that I need to quickly figure out whether two nodes on
both sides of a call graph edge are in the same SCC.  I have not found
a way of doing that with the current code (please let me know if I
overlooked something obvious) but with the patch below it becomes as
simple as comparing their 

  ((struct ipa_dfs_info *) node->aux)->low_link

The patch bootstraps and tests fine on x86_64-linux.  Is it OK for
trunk?

Thanks,

Martin


2011-05-02  Martin Jambor  <mjambor@suse.cz>

	* ipa-utils.c (searchc): Update low_link to lowest DFN of a SCC.

Index: src/gcc/ipa-utils.c
===================================================================
--- src.orig/gcc/ipa-utils.c
+++ src/gcc/ipa-utils.c
@@ -134,6 +134,7 @@ searchc (struct searchc_env* env, struct
 	x = env->stack[--(env->stack_size)];
 	x_info = (struct ipa_dfs_info *) x->aux;
 	x_info->on_stack = false;
+	x_info->low_link = v_info->dfn_number;
 
 	if (env->reduce)
 	  {

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

only message in thread, other threads:[~2011-05-12 16:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-12 20:00 [PATCH] Marking SCCs in ipa_reduced_postorder Martin Jambor

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).