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 <mjam...@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) {