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
- Date: Tue, 14 May 2013 23:02:16 -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>
On 05/14/2013 03:14 PM, Steve Ellcey wrote:
While Jeff works on the threader, I was wondering if I could get approval for
just the dominance.c part of the patch. This would allow me to use my pass as
a dynamically loaded optimization pass. But without this change to dominance.c,
the compiler aborts in iterate_fix_dominators when I do that.
Steve Ellcey
sellcey@imgtec.com
2013-05-14 Steve Ellcey <sellcey@imgtec.com>
* dominance.c (iterate_fix_dominators): Add null check.
I'd like to understand this a little more before we go forward with it.
AFAICT, that routine is trying to incrementally update the dominators
using knowledge that the region you've copied is SESE. It's unclear
what happens in the region is not SESE.
Threading mucks up the dominator tree in fairly serious ways and to the
best of my knowledge neither of the calls to thread across edges make
any attempt to incrementally update the dominator tree. They wipe it
completely, they also have to be quite careful in how they manipulate
the various graphs to avoid getting into an inconsistent state, then
calling routines that assume consistent state.
I realize you're trying to do the same, but by using the SESE copier,
you're implicitly trying to do an incremental update. I think you're
going to really need to look at the assumptions of that code and verify
that the switch FSA optimization doesn't violate those assumptions.
Jeff