public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* speeding up liveness analysis ideas.
@ 2001-10-20  4:28 Jan Hubicka
  2001-10-20  9:06 ` Daniel Berlin
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Hubicka @ 2001-10-20  4:28 UTC (permalink / raw)
  To: rth, gcc

Hi,
Not only on Brad's testcase we spend very important amount of time in the
liveness analysis.  This is relatively sad score and I think we should try
to improve it.  It is also interesting that the times appears to be considerably
worse in the current code than they was in 3.0 times and I don't recall any
important change to the code possibly responsible for that.

Here are several assorted ideas what I think can help

1) Use df.c module to find the references and uses - we currently spend
quite a lot of time in mark_set_1 and for_each_rtx modules.  Discovering all
uses/sets at once before relaxation process can be good idea...
2) Reverse topological order the blocks for relaxation progress
   - this should help any iterative dataflow..
3) Avoid the global liveness rebuild in optimize_for_mode_switching.

This is dificult because it do use commit_edge_insertions that basically
does arbitary modifications of the CFG and makes it dificult to track down
all modified blocks to locally re-examine.

I think I can get this done at lower level.  If I create new BB flag BB_MODIFIED
and clear it at the begginig of pass and make emit_insn/remove_insn familly to
set this flag, I can get the information for lowlevel.
Then I can easilly prepare the bitmap of blocks to update.  The if converison
and cfg_cleanup can benefit from this infrastructure.

Other alternative is to do it at higher level in the CFG manipulation routines,
so there can be made difference between local and global transformation
so we don't need to rerun the relaxation progress (or know whether the
pass can do global changes from it's overall design).  But I am not quite
sure how many places would need modification then.

Also why the local update is cheaper - if we rerun relaxation and we do only
local updates it should use exactly one iteration.  Is the local update
basically designed to catch the bugs?

What do you think?  Does that make sense?

Honza

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

* Re: speeding up liveness analysis ideas.
  2001-10-20  4:28 speeding up liveness analysis ideas Jan Hubicka
@ 2001-10-20  9:06 ` Daniel Berlin
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Berlin @ 2001-10-20  9:06 UTC (permalink / raw)
  To: Jan Hubicka; +Cc: rth, gcc

On Saturday, October 20, 2001, at 07:23  AM, Jan Hubicka wrote:

> Hi,
> Not only on Brad's testcase we spend very important amount of time in 
> the
> liveness analysis.  This is relatively sad score and I think we should 
> try
> to improve it.  It is also interesting that the times appears to be 
> considerably
> worse in the current code than they was in 3.0 times and I don't recall 
> any
> important change to the code possibly responsible for that.
>
>
It could just be bad bitmap set/clear ordering or something.
In fact, it's likely the cause if you are correct in that there have 
been few changes to the code.
Just changing the number/spread across blocks of registers would have a 
significant impact on the speed of the bitmap operations.
Once they fall out of the current bitmap element, it's linear.

> Here are several assorted ideas what I think can help
>
> 1) Use df.c module to find the references and uses - we currently spend
> quite a lot of time in mark_set_1 and for_each_rtx modules.  
> Discovering all
> uses/sets at once before relaxation process can be good idea...
Yup.

> 2) Reverse topological order the blocks for relaxation progress
>    - this should help any iterative dataflow..
Yup.

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

end of thread, other threads:[~2001-10-20  9:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-20  4:28 speeding up liveness analysis ideas Jan Hubicka
2001-10-20  9:06 ` Daniel Berlin

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