Re: [PATCH] New switch optimization pass (PR tree-optimization/54742)

2013-05-16 Thread Jeff Law
On 05/16/2013 11:10 AM, Steve Ellcey wrote: On Thu, 2013-05-16 at 10:58 +0200, Richard Biener wrote: 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. A

Re: [PATCH] New switch optimization pass (PR tree-optimization/54742)

2013-05-16 Thread Steve Ellcey
On Thu, 2013-05-16 at 10:58 +0200, Richard Biener wrote: > > > > 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 cha

Re: [PATCH] New switch optimization pass (PR tree-optimization/54742)

2013-05-16 Thread Richard Biener
On Thu, May 16, 2013 at 5:38 AM, Jeff Law wrote: > 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. H

Re: [PATCH] New switch optimization pass (PR tree-optimization/54742)

2013-05-15 Thread Jeff Law
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 x

Re: [PATCH] New switch optimization pass (PR tree-optimization/54742)

2013-05-15 Thread Zdenek Dvorak
Hi, > > 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

Re: [PATCH] New switch optimization pass (PR tree-optimization/54742)

2013-05-15 Thread Steve Ellcey
On Wed, 2013-05-15 at 10:44 +0200, Richard Biener wrote: > Indeed. I'd rather have a flag to the SESE copier that tells it the region > is SEME and in that case make it not update dominators but leave that > to the caller (which means, recompute them). It seems the code already > handles ME regi

Re: [PATCH] New switch optimization pass (PR tree-optimization/54742)

2013-05-15 Thread Jeff Law
On 05/15/2013 02:44 AM, Richard Biener wrote: Indeed. I'd rather have a flag to the SESE copier that tells it the region is SEME and in that case make it not update dominators but leave that to the caller (which means, recompute them). It seems the code already handles ME regions if the other

Re: [PATCH] New switch optimization pass (PR tree-optimization/54742)

2013-05-15 Thread Steven Bosscher
On Wed, May 15, 2013 at 10:44 AM, Richard Biener wrote: > Indeed. I'd rather have a flag to the SESE copier that tells it the region > is SEME and in that case make it not update dominators but leave that > to the caller (which means, recompute them). And rename the copier to SEME copier instead

Re: [PATCH] New switch optimization pass (PR tree-optimization/54742)

2013-05-15 Thread Richard Biener
On Wed, May 15, 2013 at 7:02 AM, Jeff Law wrote: > 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 opti

Re: [PATCH] New switch optimization pass (PR tree-optimization/54742)

2013-05-14 Thread Jeff Law
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 a

Re: [PATCH] New switch optimization pass (PR tree-optimization/54742)

2013-05-14 Thread Steve Ellcey
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

Re: [PATCH] New switch optimization pass (PR tree-optimization/54742)

2013-05-14 Thread Richard Biener
On Mon, May 13, 2013 at 10:28 PM, Jeff Law wrote: > On 05/13/2013 02:16 PM, Steve Ellcey wrote: >> >> Here is the latest version of my SSA optimization pass to do the switch >> statement optimization described in PR 54742 (core_state_transition from >> coremark). >> >> I have tested this optimizat

Re: [PATCH] New switch optimization pass (PR tree-optimization/54742)

2013-05-13 Thread Jeff Law
On 05/13/2013 02:16 PM, Steve Ellcey wrote: Here is the latest version of my SSA optimization pass to do the switch statement optimization described in PR 54742 (core_state_transition from coremark). I have tested this optimization with a x86 bootstrap and GCC test run with no errors and tested

[PATCH] New switch optimization pass (PR tree-optimization/54742)

2013-05-13 Thread Steve Ellcey
Here is the latest version of my SSA optimization pass to do the switch statement optimization described in PR 54742 (core_state_transition from coremark). I have tested this optimization with a x86 bootstrap and GCC test run with no errors and tested the MIPS cross compiler with no errors. Becaus