[PATCH] Fix PR tree-optimization/17724

Jakub Jelinek jakub@redhat.com
Fri Oct 8 07:05:00 GMT 2004


On Thu, Oct 07, 2004 at 06:15:56PM -0400, Kazu Hirata wrote:
> Hi Jakub,
> 
> > The first patch calls free_dominance_info in cleanup_tree_cfg whenever
> > delete_unreachable_blocks deleted some basic blocks.  It should be safe, but
> > might be expensive.
> 
> I guess so.  thread_jumps, which is called right after
> delete_unreachable_blocks in cleanup_tree_cfg, tries to maintain the
> dominator info, so if you are freeing it, you might want to remove the
> code to maintain it in thread_jumps.

Yeah, my preferred patch is 3 (recomputing some dominators in
delete_unreachable_blocks).  Possibly if that turns out to be too expensive
when there are too many basic blocks as predecessors or successors of
unreachable blocks (that aren't unreachable themselves), we could add
later on some ceiling (the one 3rd of basic blocks below is completely
arbitrary), e.g.
  if (nsuccs * 3 > n_basic_blocks)
    free_dominance_info (CDI_DOMINATORS);
  else
    for (i = 0; i < nsuccs; ++i)
      recompute one by one;

	Jakub



More information about the Gcc-patches mailing list