This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/26854] Inordinate compile times on large routines
- From: "zadeck at naturalbridge dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Dec 2007 16:06:25 -0000
- Subject: [Bug tree-optimization/26854] Inordinate compile times on large routines
- References: <bug-26854-271@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #46 from zadeck at naturalbridge dot com 2007-12-20 16:06 -------
Subject: Re: Inordinate compile times on large
routines
> indexes will be 0, 1, 2, 3.
>
> there are no def-def chains, and in particular there are no artificial
> def to artificial def chains. those increments only happen for
> artificial defs or uses. Regular uses or defs have an insn. a normal
> def-use chain will have index 0.
>
>
>
however there is a bug with the patch that steven did not notice, try
this one instead.
Index: df-problems.c
===================================================================
--- df-problems.c (revision 131096)
+++ df-problems.c (working copy)
@@ -1855,13 +1855,23 @@ df_live_verify_transfer_functions (void)
#define df_chain_problem_p(FLAG) (((enum
df_chain_flags)df_chain->local_flags)&(FLAG))
+static long df_chain_counters[4];
+
/* Create a du or ud chain from SRC to DST and link it into SRC. */
struct df_link *
df_chain_create (struct df_ref *src, struct df_ref *dst)
{
struct df_link *head = DF_REF_CHAIN (src);
- struct df_link *link = pool_alloc (df_chain->block_pool);;
+ struct df_link *link = pool_alloc (df_chain->block_pool);
+ int index = 0;
+
+ if (!src->insn)
+ index += (src->type == DF_REF_REG_DEF) ? 2 : 1;
+ if (!dst->insn)
+ index += (dst->type == DF_REF_REG_DEF) ? 2 : 1;
+
+ df_chain_counters[index]++;
DF_REF_CHAIN (src) = link;
link->next = head;
@@ -2156,11 +2166,18 @@ df_chain_finalize (bitmap all_blocks)
{
unsigned int bb_index;
bitmap_iterator bi;
-
+
+ memset (df_chain_counters, 0, 4*sizeof(long));
+
EXECUTE_IF_SET_IN_BITMAP (all_blocks, 0, bb_index, bi)
{
df_chain_create_bb (bb_index);
}
+
+ fprintf (stderr, "real -> real = %ld\n", df_chain_counters[0]);
+ fprintf (stderr, "real -> art = %ld\n", df_chain_counters[1]);
+ fprintf (stderr, "art -> real = %ld\n", df_chain_counters[2]);
+ fprintf (stderr, "art -> art = %ld\n", df_chain_counters[3]);
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26854