This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Attacking quadratic behaviors associated with SWITCH_EXPR
- From: Steven Bosscher <stevenb at suse dot de>
- To: Daniel Berlin <dberlin at dberlin dot org>
- Cc: law at redhat dot com, Kazu Hirata <kazu at cs dot umass dot edu>, gcc at gcc dot gnu dot org
- Date: Wed, 10 Nov 2004 09:00:22 +0100
- Subject: Re: Attacking quadratic behaviors associated with SWITCH_EXPR
- Organization: SUSE Labs
- References: <20041022.204311.102581980.kazu@cs.umass.edu> <200411100234.05735.stevenb@suse.de> <Pine.LNX.4.60.0411092033550.17025@dberlin.org>
On Wednesday 10 November 2004 02:45, Daniel Berlin wrote:
> > It's tree_redirect_edge_and_branch that is quadratic if most outgoing
> > edges of a block ending in a SWITCH_EXPR are critical edges.
> >
> > (Note that pass_split_crit_edges really shouldn't be a pass. It only
> > provides a property, PROP_no_crit_edges, but it's run unconditionally,
>
> That's the fault of the pass manager.
> Passes can provide propreties.
> If nothing requires the property it provides (due to them not being
> executed), it shouldn't run the pass that provides the property.
>
> > so even with -fno-tree-pre (which is the only pass that requires this
> > property) we still run the pass_split_crit_edges pass - wasteful!)
>
> This is true, PRE is the only pass that *requires* it (and even that is
> not strictly true. I could make PRE not require it, at the expense of
> missing a bunch of redundancies).
> However, splitting critical edges is *useful* to a lot of passes, AFAIK.
Perhaps we should run the pass earlier then, or always keep critical
edges split over some range of passes, etc. The current situation is
really stupid: We split edges, then run PRE (or not), and then spend
a good amount of time unsplitting edges in cfgcleanup :-/
Gr.
Steven