public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [dataflow] remove useless call from fwprop
@ 2007-03-28  9:48 Paolo Bonzini
  2007-03-28 10:22 ` Paolo Bonzini
  0 siblings, 1 reply; 4+ messages in thread
From: Paolo Bonzini @ 2007-03-28  9:48 UTC (permalink / raw)
  To: GCC Patches, Kenneth Zadeck

This is one of the most expensive df_* calls, and it costs 1%
of compilation time.  No kidding.

The call is not necessary anymore.  fwprop can process the uses in
whatever order they are, until it reaches a fixed point.  It does
need the refs to be ordered, but computing use-def chains already
does that.

Ok?

Paolo

2007-03-28  Paolo Bonzini  <bonzini@gnu.org.

	* fwprop.c (fwprop_init): Don't call df_maybe_reorganize_use_refs.

Index: fwprop.c
===================================================================
--- fwprop.c    (revision 123155)
+++ fwprop.c    (working copy)
@@ -933,7 +933,6 @@ fwprop_init (void)
   df_set_flags (DF_EQ_NOTES);
   df_chain_add_problem (DF_UD_CHAIN);
   df_analyze ();
-  df_maybe_reorganize_use_refs (DF_REF_ORDER_BY_INSN_WITH_NOTES);
   df_set_flags (DF_DEFER_INSN_RESCAN);
 }
 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dataflow] remove useless call from fwprop
  2007-03-28  9:48 [dataflow] remove useless call from fwprop Paolo Bonzini
@ 2007-03-28 10:22 ` Paolo Bonzini
  2007-03-28 12:02   ` Kenneth Zadeck
  0 siblings, 1 reply; 4+ messages in thread
From: Paolo Bonzini @ 2007-03-28 10:22 UTC (permalink / raw)
  To: bonzini; +Cc: GCC Patches, Kenneth Zadeck

Paolo Bonzini wrote:
> This is one of the most expensive df_* calls, and it costs 1%
> of compilation time.  No kidding.

Oops.  The 1% is because I had another patch in my tree.
Still this cannot hurt.

Paolo

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dataflow] remove useless call from fwprop
  2007-03-28 10:22 ` Paolo Bonzini
@ 2007-03-28 12:02   ` Kenneth Zadeck
  2007-03-28 12:22     ` Paolo Bonzini
  0 siblings, 1 reply; 4+ messages in thread
From: Kenneth Zadeck @ 2007-03-28 12:02 UTC (permalink / raw)
  To: bonzini; +Cc: GCC Patches

Paolo Bonzini wrote:
> Paolo Bonzini wrote:
>   
>> This is one of the most expensive df_* calls, and it costs 1%
>> of compilation time.  No kidding.
>>     
>
> Oops.  The 1% is because I had another patch in my tree.
> Still this cannot hurt.
>
> Paolo
>   
Have you tested this? I would love to get rid of this, but unless you
get rid of

  for (i = 0; i < DF_USES_TABLE_SIZE (); i++)
    {
      struct df_ref *use = DF_USES_GET (i);
      if (use)
    if (!current_loops
        || DF_REF_TYPE (use) == DF_REF_REG_USE
        || DF_REF_BB (use)->loop_father == NULL)
      forward_propagate_into (use);
    }
 
and the other code like it.,
you cannot get rid of that call.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dataflow] remove useless call from fwprop
  2007-03-28 12:02   ` Kenneth Zadeck
@ 2007-03-28 12:22     ` Paolo Bonzini
  0 siblings, 0 replies; 4+ messages in thread
From: Paolo Bonzini @ 2007-03-28 12:22 UTC (permalink / raw)
  To: Kenneth Zadeck; +Cc: GCC Patches

> Have you tested this?

Sure, bootstrapped/tested i686-pc-linux-gnu.

> I would love to get rid of this, but unless you get rid of
> 
>   for (i = 0; i < DF_USES_TABLE_SIZE (); i++)
>     {
>       struct df_ref *use = DF_USES_GET (i);
>       if (use)
>     if (!current_loops
>         || DF_REF_TYPE (use) == DF_REF_REG_USE
>         || DF_REF_BB (use)->loop_father == NULL)
>       forward_propagate_into (use);
>     }
>  
> and the other code like it.,
> you cannot get rid of that call.

I can, because the table is already ordered by register number thanks to
the reaching-definition computation.  The thing is, this code is
independent of the *ordering* of the table.  It just cares that the
table is there.

Paolo

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-03-28 12:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-28  9:48 [dataflow] remove useless call from fwprop Paolo Bonzini
2007-03-28 10:22 ` Paolo Bonzini
2007-03-28 12:02   ` Kenneth Zadeck
2007-03-28 12:22     ` Paolo Bonzini

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