This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] New switch optimization pass (PR tree-optimization/54742)
- From: Jeff Law <law at redhat dot com>
- To: Steve Ellcey <sellcey at imgtec dot com>
- Cc: Richard Biener <richard dot guenther at gmail dot com>, gcc-patches at gcc dot gnu dot org, dnovillo at google dot com, amacleod at redhat dot com, Zdenek Dvorak <ook at ucw dot cz>
- Date: Wed, 15 May 2013 21:38:05 -0600
- Subject: Re: [PATCH] New switch optimization pass (PR tree-optimization/54742)
- References: <1368476190 dot 22602 dot 109 dot camel at ubuntu-sellcey> <51914D02 dot 30908 at redhat dot com> <CAFiYyc3W1sLOPQPy0XX_QfoLTZc6nioxCh8ikLtdfs26x-BG1A at mail dot gmail dot com> <1368566063 dot 16206 dot 9 dot camel at ubuntu-sellcey> <519316D8 dot 70204 at redhat dot com> <CAFiYyc09pt6B7bPxjmjqpp4wTM=f1FDSTGtU+HtZiwpRBZC5pw at mail dot gmail dot com> <1368642493 dot 16206 dot 34 dot camel at ubuntu-sellcey>
On 05/15/2013 12:28 PM, Steve Ellcey wrote:
Here is a patch that adds a flag to gimple_duplicate_sese_region to tell
it whether or not to update the dominator information. I had to add the
same flag to copy_bbs to make it all work. How does this look? I
tested it with a bootstrap and test on x86 (with my optimization
enabled) and got no regressions.
2013-05-15 Steve Ellcey <sellcey@imgtec.com>
* cfghooks.c (copy_bbs): Add update_dominance argument.
* cfghooks.h (copy_bbs): Update prototype.
* tree-cfg.c (gimple_duplicate_sese_region):
Add update_dominance argument.
* tree-flow.h (gimple_duplicate_sese_region): Update prototype.
* tree-ssa-loop-ch.c (copy_loop_headers): Update
gimple_duplicate_sese_region call.
* tree-vect-loop-manip.c (slpeel_tree_duplicate_loop_to_edge_cfg):
Update copy_bbs call.
* cfgloopmanip.c (duplicate_loop_to_header_edge): Ditto.
* trans-mem.c (ipa_uninstrument_transaction): Ditto.
So I'd change gimple_duplicate_sese_region to gimple_duplicate_seme
region per comments from others.
Where you document UPDATE_DOMINANCE, I'd add something like: When
UPDATE_DOMINANCE is true, it is assumed that duplicating the region (or
copying the blocks for copy_bbs) may change the dominator tree in ways
that are not suitable for an incremental update and the caller is
responsible for destroying and recomputing the dominator tree.
Hmm, not terribly happy with that wording, but that gives you an idea of
what I'm after. When would someone set UPDATE_DOMINANCE to true and
what are their responsibilities when they do so.
Approved with the name change and a better comment for UPDATE_DOMINANCE.
Jeff