public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* intent in cfg_layout_initialize
@ 2004-04-29  6:49 DJ Delorie
  2004-04-29 10:27 ` Jan Hubicka
  0 siblings, 1 reply; 4+ messages in thread
From: DJ Delorie @ 2004-04-29  6:49 UTC (permalink / raw)
  To: gcc


In cfg_layout_initialize, there's a call to cleanup_cfg:

  cleanup_cfg (CLEANUP_CFGLAYOUT);

There's no comment here as to the intent.  Is it expected to do lots
of (or any) optimizations?  Some are disabled in cfgcleanup.c when
this flag is set, but not all.  Specifically, on an internal port I'm
working on, enough optimization happens to invalidate the live
registers list, and I get the ubiquitous "verify_local_live_at_start"
error.

Should we (or could we) be passing CLEANUP_UPDATE_LIFE here?  Or
should I dig into cfgcleanup.c and disable more optimizations?  Or is
something else happening?

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

* Re: intent in cfg_layout_initialize
  2004-04-29  6:49 intent in cfg_layout_initialize DJ Delorie
@ 2004-04-29 10:27 ` Jan Hubicka
  2004-04-29 15:58   ` DJ Delorie
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Hubicka @ 2004-04-29 10:27 UTC (permalink / raw)
  To: DJ Delorie; +Cc: gcc

> 
> In cfg_layout_initialize, there's a call to cleanup_cfg:
> 
>   cleanup_cfg (CLEANUP_CFGLAYOUT);
> 
> There's no comment here as to the intent.  Is it expected to do lots
> of (or any) optimizations?  Some are disabled in cfgcleanup.c when
> this flag is set, but not all.  Specifically, on an internal port I'm

The ones that are disabled are simply not needed in the form of CFG
where you can redirect edes, ie cleanup_cfg (CLEANUP_CFGLAYOUT) is as
strong as normal cleanup_cfg when in normal mode, just it ought to be a
tinny bit faster.

The intend is to gradually revamp whole compiler to use cfglayout mode.
> working on, enough optimization happens to invalidate the live
> registers list, and I get the ubiquitous "verify_local_live_at_start"
> error.
> 
> Should we (or could we) be passing CLEANUP_UPDATE_LIFE here?  Or
> should I dig into cfgcleanup.c and disable more optimizations?  Or is
> something else happening?
passing CLEANUP_UPDATE_LIFE would work.
You get the liveness invalidated when entering to cfglayout before
sched2, right?
I think best fix is to simply add parameter of cfglayout_initialize
specifying whether the liveness shall be preserved, as for tracer the
cfglayout_initialize is called before liveness is built.

Honza

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

* Re: intent in cfg_layout_initialize
  2004-04-29 10:27 ` Jan Hubicka
@ 2004-04-29 15:58   ` DJ Delorie
  2004-04-30  2:06     ` DJ Delorie
  0 siblings, 1 reply; 4+ messages in thread
From: DJ Delorie @ 2004-04-29 15:58 UTC (permalink / raw)
  To: hubicka; +Cc: gcc


> passing CLEANUP_UPDATE_LIFE would work.
> You get the liveness invalidated when entering to cfglayout before
> sched2, right?

The problem shows up in 33.bbro.  Some conditional jumps are deleted,
but the life info for the register it's testing isn't updated or
propogated.

> I think best fix is to simply add parameter of cfglayout_initialize
> specifying whether the liveness shall be preserved, as for tracer
> the cfglayout_initialize is called before liveness is built.

The one that I'm seeing is the call from the start of
reorder_basic_blocks().

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

* Re: intent in cfg_layout_initialize
  2004-04-29 15:58   ` DJ Delorie
@ 2004-04-30  2:06     ` DJ Delorie
  0 siblings, 0 replies; 4+ messages in thread
From: DJ Delorie @ 2004-04-30  2:06 UTC (permalink / raw)
  To: hubicka, gcc


> > I think best fix is to simply add parameter of cfglayout_initialize
> > specifying whether the liveness shall be preserved, as for tracer
> > the cfglayout_initialize is called before liveness is built.
> 
> The one that I'm seeing is the call from the start of
> reorder_basic_blocks().

Didn't work.  x86 failed many tests because update_life got confused
about the FPU registers ($st, $st(1), etc) and deleted a few sets of
$st that it shouldn't have :-P

Any ideas?  Should I disable jump elimination for CLEANUP_CFGLAYOUT ?

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

end of thread, other threads:[~2004-04-29 23:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-29  6:49 intent in cfg_layout_initialize DJ Delorie
2004-04-29 10:27 ` Jan Hubicka
2004-04-29 15:58   ` DJ Delorie
2004-04-30  2:06     ` DJ Delorie

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