Re: Fix PR 53743 and other -freorder-blocks-and-partition failures (issue6823047)

2013-05-11 Thread Steven Bosscher
On Sat, May 11, 2013 at 4:38 PM, Teresa Johnson wrote: > /* If we are partitioning hot/cold basic blocks, we don't want to > mess up unconditional or indirect jumps that cross between hot > and cold sections. > > Basic block partitioning may result in some jumps that appear to >

Re: Fix PR 53743 and other -freorder-blocks-and-partition failures (issue6823047)

2013-05-11 Thread Teresa Johnson
On Sat, May 11, 2013 at 4:19 AM, Jan Hubicka wrote: >> > >> > BTW2: We badly need to figure out a way to create test cases for FDO... :-( >> >> Yes. I had tried testing awhile back with the gcc regression tests and >> enabling -freorder-blocks-and-partition, but none of the issues I was >> having

Re: Fix PR 53743 and other -freorder-blocks-and-partition failures (issue6823047)

2013-05-11 Thread Teresa Johnson
On Sat, May 11, 2013 at 4:44 AM, Steven Bosscher wrote: > On Sat, May 11, 2013 at 5:21 AM, Teresa Johnson wrote: >> Here there was a block that happened to be laid out at the very start >> of the cold section (it was jumped to from elsewhere, not reached via >> fall through from its layout predece

Re: Fix PR 53743 and other -freorder-blocks-and-partition failures (issue6823047)

2013-05-11 Thread Jan Hubicka
> On Sat, May 11, 2013 at 1:19 PM, Jan Hubicka wrote: > > Once -freorder-blocks-and-partition actually works, we should enable it by > > default with -fprofile-generate (I recall I was trying to do that once, but > > I am not sure what was outcome back then and why it did not happen). > > That shou

Re: Fix PR 53743 and other -freorder-blocks-and-partition failures (issue6823047)

2013-05-11 Thread Steven Bosscher
On Sat, May 11, 2013 at 1:19 PM, Jan Hubicka wrote: > Once -freorder-blocks-and-partition actually works, we should enable it by > default with -fprofile-generate (I recall I was trying to do that once, but > I am not sure what was outcome back then and why it did not happen). > That should get it

Re: Fix PR 53743 and other -freorder-blocks-and-partition failures (issue6823047)

2013-05-11 Thread Steven Bosscher
On Sat, May 11, 2013 at 5:21 AM, Teresa Johnson wrote: > Here there was a block that happened to be laid out at the very start > of the cold section (it was jumped to from elsewhere, not reached via > fall through from its layout predecessor). Thus it was preceded by a > switch section note, which

Re: Fix PR 53743 and other -freorder-blocks-and-partition failures (issue6823047)

2013-05-11 Thread Jan Hubicka
> > > > BTW2: We badly need to figure out a way to create test cases for FDO... :-( > > Yes. I had tried testing awhile back with the gcc regression tests and > enabling -freorder-blocks-and-partition, but none of the issues I was > having with larger benchmarks fired. I think there just aren't en

Re: Fix PR 53743 and other -freorder-blocks-and-partition failures (issue6823047)

2013-05-10 Thread Teresa Johnson
On Fri, May 10, 2013 at 2:00 PM, Steven Bosscher wrote: > On Fri, May 10, 2013 at 5:54 PM, Teresa Johnson wrote: >> The main issue I had here, and why I made this change, is that we go >> in and out of cfglayout mode several times after bb partitioning and >> then out_of_cfglayout. The problem was

Re: Fix PR 53743 and other -freorder-blocks-and-partition failures (issue6823047)

2013-05-10 Thread Steven Bosscher
On Fri, May 10, 2013 at 11:10 PM, Jan Hubicka wrote: >> There shouldn't be any forwarder blocks in cfg layout mode. What did >> you need this for? >> >> BTW2: We badly need to figure out a way to create test cases for FDO... :-( > > We have gcc.dg/tree-prof and friends. What do you need to add?

Re: Fix PR 53743 and other -freorder-blocks-and-partition failures (issue6823047)

2013-05-10 Thread Jan Hubicka
> There shouldn't be any forwarder blocks in cfg layout mode. What did > you need this for? > > BTW2: We badly need to figure out a way to create test cases for FDO... :-( We have gcc.dg/tree-prof and friends. What do you need to add? Honza

Re: Fix PR 53743 and other -freorder-blocks-and-partition failures (issue6823047)

2013-05-10 Thread Steven Bosscher
On Fri, May 10, 2013 at 5:54 PM, Teresa Johnson wrote: > The main issue I had here, and why I made this change, is that we go > in and out of cfglayout mode several times after bb partitioning and > then out_of_cfglayout. The problem was that when we subsequently went > in and out of cfglayout mode

Re: Fix PR 53743 and other -freorder-blocks-and-partition failures (issue6823047)

2013-05-10 Thread Teresa Johnson
On Thu, May 9, 2013 at 3:40 PM, Steven Bosscher wrote: > On Thu, May 9, 2013 at 11:42 PM, Diego Novillo wrote: >> On 2013-05-08 01:13 , Teresa Johnson wrote: >>> -static void >>> +void >>> emit_barrier_after_bb (basic_block bb) >>> { >>>rtx barrier = emit_barrier_after (BB_END (bb)); >>> -

Re: Fix PR 53743 and other -freorder-blocks-and-partition failures (issue6823047)

2013-05-10 Thread Teresa Johnson
On Fri, May 10, 2013 at 4:52 AM, Jan Hubicka wrote: >> On 05/07/13 23:13, Teresa Johnson wrote: >> >-- >> >Revised patch that fixes failures encountered when enabling >> >-freorder-blocks-and-partition, including the failure reported in PR 53743. >> > >> >This includes new veri

Re: Fix PR 53743 and other -freorder-blocks-and-partition failures (issue6823047)

2013-05-10 Thread Teresa Johnson
On Thu, May 9, 2013 at 2:42 PM, Diego Novillo wrote: > On 2013-05-08 01:13 , Teresa Johnson wrote: >> >> Somehow Rietveld didn't upload the patch properly. I've attached the >> patch to this email instead. Here is the description: > > > Rietveld has turned out to be far less useful that I had hope

Re: Fix PR 53743 and other -freorder-blocks-and-partition failures (issue6823047)

2013-05-10 Thread Steven Bosscher
On Fri, May 10, 2013 at 12:57 AM, Xinliang David Li wrote: > On Thu, May 9, 2013 at 3:40 PM, Steven Bosscher wrote: >> This patch mixes up things badly from the point of >> what-depends-on-what, the whole approach looks wrong to me. > > > Do you mean the 'source file dependency' or 'logical depend

Re: Fix PR 53743 and other -freorder-blocks-and-partition failures (issue6823047)

2013-05-10 Thread Jan Hubicka
> On 05/07/13 23:13, Teresa Johnson wrote: > >-- > >Revised patch that fixes failures encountered when enabling > >-freorder-blocks-and-partition, including the failure reported in PR 53743. > > > >This includes new verification code to ensure no cold blocks dominate hot > >bloc

Re: Fix PR 53743 and other -freorder-blocks-and-partition failures (issue6823047)

2013-05-09 Thread Jeff Law
On 05/07/13 23:13, Teresa Johnson wrote: -- Revised patch that fixes failures encountered when enabling -freorder-blocks-and-partition, including the failure reported in PR 53743. This includes new verification code to ensure no cold blocks dominate hot blocks contributed by

Re: Fix PR 53743 and other -freorder-blocks-and-partition failures (issue6823047)

2013-05-09 Thread Xinliang David Li
On Thu, May 9, 2013 at 3:40 PM, Steven Bosscher wrote: > On Thu, May 9, 2013 at 11:42 PM, Diego Novillo wrote: >> On 2013-05-08 01:13 , Teresa Johnson wrote: >>> -static void >>> +void >>> emit_barrier_after_bb (basic_block bb) >>> { >>>rtx barrier = emit_barrier_after (BB_END (bb)); >>> -

Re: Fix PR 53743 and other -freorder-blocks-and-partition failures (issue6823047)

2013-05-09 Thread Steven Bosscher
On Thu, May 9, 2013 at 11:42 PM, Diego Novillo wrote: > On 2013-05-08 01:13 , Teresa Johnson wrote: >> -static void >> +void >> emit_barrier_after_bb (basic_block bb) >> { >>rtx barrier = emit_barrier_after (BB_END (bb)); >> - BB_FOOTER (bb) = unlink_insn_chain (barrier, barrier); >> + if (

Re: Fix PR 53743 and other -freorder-blocks-and-partition failures (issue6823047)

2013-05-09 Thread Diego Novillo
On 2013-05-08 01:13 , Teresa Johnson wrote: Somehow Rietveld didn't upload the patch properly. I've attached the patch to this email instead. Here is the description: Rietveld has turned out to be far less useful that I had hoped. If you are running ubuntu precise, the upload script is having

Fix PR 53743 and other -freorder-blocks-and-partition failures (issue6823047)

2013-05-07 Thread Teresa Johnson
binyG3NHBftCR.bin Description: Binary data

Re: Fix PR 53743 and other -freorder-blocks-and-partition failures (issue6823047)

2013-02-05 Thread Teresa Johnson
Thanks for the confirmation that the -g issue is orthogonal. I did start to try to address it but got pulled away by some other things for awhile. I'll see if I can take another stab at it. In the meantime, could one of the global maintainers take a look at the patch? I don't want it to get too st

Re: Fix PR 53743 and other -freorder-blocks-and-partition failures (issue6823047)

2013-01-31 Thread Christophe Lyon
Hello, Sorry for the long delay (ref http://patchwork.ozlabs.org/patch/199397/) On 6 December 2012 20:26, Teresa Johnson wrote: > > > > On Wed, Nov 28, 2012 at 7:48 AM, Christophe Lyon > wrote: >> >> I have updated my trunk checkout, and I can confirm that eval.c now >> compiles with your pat

Re: Fix PR 53743 and other -freorder-blocks-and-partition failures (issue6823047)

2012-11-26 Thread Jack Howarth
On Mon, Nov 26, 2012 at 12:19:55PM -0800, Teresa Johnson wrote: > Are you sure you have all my changes applied? I applied the 4 patches > attached to PR55121 into my trunk checkout that has my fixes, and to a > pristine trunk checkout. I configured and built both for > --target=arm-none-linux-gnuea

Re: Fix PR 53743 and other -freorder-blocks-and-partition failures (issue6823047)

2012-11-26 Thread Teresa Johnson
Are you sure you have all my changes applied? I applied the 4 patches attached to PR55121 into my trunk checkout that has my fixes, and to a pristine trunk checkout. I configured and built both for --target=arm-none-linux-gnueabi, and built using your options, .i file and gcda file. I can reproduce

Re: Fix PR 53743 and other -freorder-blocks-and-partition failures (issue6823047)

2012-11-26 Thread Christophe Lyon
Hi, I have tested your patch on Spec2000 on ARM, and I can still see several failures caused by: "error: fallthru edge crosses section boundary", including the case described in PR55121. On 26 November 2012 16:55, Teresa Johnson wrote: > Ping. > Teresa > > On Thu, Nov 15, 2012 at 12:10 PM, Teres

Re: Fix PR 53743 and other -freorder-blocks-and-partition failures (issue6823047)

2012-11-26 Thread Teresa Johnson
Ping. Teresa On Thu, Nov 15, 2012 at 12:10 PM, Teresa Johnson wrote: > Revised patch that fixes failures encountered when enabling > -freorder-blocks-and-partition, including the failure reported in PR 53743. > > This includes new verification code to ensure no cold blocks dominate hot > blocks c

Fix PR 53743 and other -freorder-blocks-and-partition failures (issue6823047)

2012-11-15 Thread Teresa Johnson
Revised patch that fixes failures encountered when enabling -freorder-blocks-and-partition, including the failure reported in PR 53743. This includes new verification code to ensure no cold blocks dominate hot blocks contributed by Steven Bosscher. I attempted to make the handling of partition up

Re: [PATCH] Fix PR 53743 and other -freorder-blocks-and-partition failures (issue6823047)

2012-11-03 Thread Teresa Johnson
On Tue, Oct 30, 2012 at 10:48 AM, Steven Bosscher wrote: > On Tue, Oct 30, 2012 at 6:20 AM, Teresa Johnson wrote: >> Index: bb-reorder.c >> === >> --- bb-reorder.c(revision 192692) >> +++ bb-reorder.c(working copy) >>

Re: [PATCH] Fix PR 53743 and other -freorder-blocks-and-partition failures (issue6823047)

2012-11-03 Thread Teresa Johnson
On Thu, Nov 1, 2012 at 2:26 PM, Teresa Johnson wrote: > On Thu, Nov 1, 2012 at 10:19 AM, Teresa Johnson wrote: >> On Wed, Oct 31, 2012 at 4:02 PM, Steven Bosscher >> wrote: >>> On Tue, Oct 30, 2012 at 10:43 PM, Teresa Johnson wrote: Sure, I will give this a try after your verification patc

Re: [PATCH] Fix PR 53743 and other -freorder-blocks-and-partition failures (issue6823047)

2012-11-01 Thread Steven Bosscher
On Thu, Nov 1, 2012 at 10:26 PM, Teresa Johnson wrote: > I'll do some testing of the fix below, but do you have any comments on > the correctness or the potential issue I raised (see my note just > below the patch)? Sorry, I don't know the pro- and epilogue threading code well enough to be of any

Re: [PATCH] Fix PR 53743 and other -freorder-blocks-and-partition failures (issue6823047)

2012-11-01 Thread Teresa Johnson
On Tue, Oct 30, 2012 at 10:48 AM, Steven Bosscher wrote: > On Tue, Oct 30, 2012 at 6:20 AM, Teresa Johnson wrote: >> Index: bb-reorder.c >> === >> --- bb-reorder.c(revision 192692) >> +++ bb-reorder.c(working copy) >>

Re: [PATCH] Fix PR 53743 and other -freorder-blocks-and-partition failures (issue6823047)

2012-11-01 Thread Teresa Johnson
On Thu, Nov 1, 2012 at 10:19 AM, Teresa Johnson wrote: > On Wed, Oct 31, 2012 at 4:02 PM, Steven Bosscher > wrote: >> On Tue, Oct 30, 2012 at 10:43 PM, Teresa Johnson wrote: >>> Sure, I will give this a try after your verification patch tests >>> complete. Does this mean that the patch you poste

Re: [PATCH] Fix PR 53743 and other -freorder-blocks-and-partition failures (issue6823047)

2012-11-01 Thread Teresa Johnson
On Wed, Oct 31, 2012 at 4:02 PM, Steven Bosscher wrote: > On Tue, Oct 30, 2012 at 10:43 PM, Teresa Johnson wrote: >> Sure, I will give this a try after your verification patch tests >> complete. Does this mean that the patch you posted above to >> force_nonfallthru_and_redirect is no longer needed

Re: [PATCH] Fix PR 53743 and other -freorder-blocks-and-partition failures (issue6823047)

2012-11-01 Thread Christophe Lyon
> I would like to work on debugging this, but it's hard without test cases... Maybe the files I attached to my PR55121 could help you in this respect? Your "sanity checking" patching does complain with these input files. Christophe.

Re: [PATCH] Fix PR 53743 and other -freorder-blocks-and-partition failures (issue6823047)

2012-10-31 Thread Steven Bosscher
On Tue, Oct 30, 2012 at 10:43 PM, Teresa Johnson wrote: > Sure, I will give this a try after your verification patch tests > complete. Does this mean that the patch you posted above to > force_nonfallthru_and_redirect is no longer needed either? I'll see if > I can avoid the need for some of my fix

Re: [PATCH] Fix PR 53743 and other -freorder-blocks-and-partition failures (issue6823047)

2012-10-30 Thread Teresa Johnson
On Tue, Oct 30, 2012 at 2:33 PM, Steven Bosscher wrote: > On Tue, Oct 30, 2012 at 10:28 PM, Steven Bosscher wrote: >> Hello Teresa, >> >> Could you try this patch for me also? It moves bbpart outside the part >> of the passes pipeline that works in cfglayout mode. > > where's the "unsend" button i

Re: [PATCH] Fix PR 53743 and other -freorder-blocks-and-partition failures (issue6823047)

2012-10-30 Thread Teresa Johnson
On Tue, Oct 30, 2012 at 2:33 PM, Steven Bosscher wrote: > On Tue, Oct 30, 2012 at 10:28 PM, Steven Bosscher wrote: >> Hello Teresa, >> >> Could you try this patch for me also? It moves bbpart outside the part >> of the passes pipeline that works in cfglayout mode. > > where's the "unsend" button i

Re: [PATCH] Fix PR 53743 and other -freorder-blocks-and-partition failures (issue6823047)

2012-10-30 Thread Steven Bosscher
On Tue, Oct 30, 2012 at 10:28 PM, Steven Bosscher wrote: > Hello Teresa, > > Could you try this patch for me also? It moves bbpart outside the part > of the passes pipeline that works in cfglayout mode. where's the "unsend" button if you need it... So, to complete the mail... Could you try this

Re: [PATCH] Fix PR 53743 and other -freorder-blocks-and-partition failures (issue6823047)

2012-10-30 Thread Steven Bosscher
Hello Teresa, Could you try this patch for me also? It moves bbpart outside the part of the passes pipeline that works in cfglayout mode.

Re: [PATCH] Fix PR 53743 and other -freorder-blocks-and-partition failures (issue6823047)

2012-10-30 Thread Steven Bosscher
On Tue, Oct 30, 2012 at 6:48 PM, Steven Bosscher wrote: > On Tue, Oct 30, 2012 at 6:20 AM, Teresa Johnson wrote: >> Index: bb-reorder.c >> === >> --- bb-reorder.c(revision 192692) >> +++ bb-reorder.c(working copy) >> @

Re: [PATCH] Fix PR 53743 and other -freorder-blocks-and-partition failures (issue6823047)

2012-10-30 Thread Steven Bosscher
On Tue, Oct 30, 2012 at 6:20 AM, Teresa Johnson wrote: > Index: bb-reorder.c > === > --- bb-reorder.c(revision 192692) > +++ bb-reorder.c(working copy) > @@ -2188,6 +2188,8 @@ insert_section_boundary_note (void) >

Re: [PATCH] Fix PR 53743 and other -freorder-blocks-and-partition failures (issue6823047)

2012-10-30 Thread Steven Bosscher
On Tue, Oct 30, 2012 at 8:49 AM, Matthew Gretton-Dann wrote: > On 30 October 2012 05:20, Teresa Johnson wrote: >> Index: cfgrtl.c >> === >> --- cfgrtl.c(revision 192692) >> +++ cfgrtl.c(working copy) >> @@ -912,7 +912,8 @@ rtl_

Re: [PATCH] Fix PR 53743 and other -freorder-blocks-and-partition failures (issue6823047)

2012-10-30 Thread Matthew Gretton-Dann
On 30 October 2012 05:20, Teresa Johnson wrote: > Index: cfgrtl.c > === > --- cfgrtl.c(revision 192692) > +++ cfgrtl.c(working copy) > @@ -912,7 +912,8 @@ rtl_can_merge_blocks (basic_block a, basic_block b > partition bo

[PATCH] Fix PR 53743 and other -freorder-blocks-and-partition failures (issue6823047)

2012-10-29 Thread Teresa Johnson
This patch fixes three different failures I encountered while trying to use -freorder-blocks-and-partition, including the failure reported in PR 53743. Bootstrapped and tested on x86_64-unknown-linux-gnu. Ok for trunk? Thanks, Teresa 2012-10-29 Teresa Johnson PR optimization/53743