Re: ipa-visibility TLC 2/n

2014-06-12 Thread Jan Hubicka
> > > > Comdat locals are now used by ipa-comdats, for thunks and for decloned > > ctors. > > We probably need to figure out bit more precise limitation of Solaris and > > either > > fix or add way for target to say what kind of comdat locals are not > > supported. > > Right. I'll start reghun

Re: ipa-visibility TLC 2/n

2014-06-12 Thread Rainer Orth
Rainer Orth writes: > Hi Honza, > >>> Unfortunately, AIX isn't the only target massively affected by your >>> recent patches. This all started with r210597 >>> >>> 2014-05-17 Jan Hubicka >>> >>> * tree-pass.h (make_pass_ipa_comdats): New pass. >>> * timevar.def (TV_IPA_COMDATS):

Re: ipa-visibility TLC 2/n

2014-06-12 Thread Rainer Orth
Hi Honza, >> Unfortunately, AIX isn't the only target massively affected by your >> recent patches. This all started with r210597 >> >> 2014-05-17 Jan Hubicka >> >> * tree-pass.h (make_pass_ipa_comdats): New pass. >> * timevar.def (TV_IPA_COMDATS): New timevar. >> * pass

Re: ipa-visibility TLC 2/n

2014-06-11 Thread Jan Hubicka
> > Unfortunately, AIX isn't the only target massively affected by your > recent patches. This all started with r210597 > > 2014-05-17 Jan Hubicka > > * tree-pass.h (make_pass_ipa_comdats): New pass. > * timevar.def (TV_IPA_COMDATS): New timevar. > * passes.def (pass_ip

Re: ipa-visibility TLC 2/n

2014-06-11 Thread Rainer Orth
Jan Hubicka writes: >> Honza, >> >> I am not sure that the problem is caused only by aliases and thunks. >> The large increase in AIX linker warnings about branches not followed >> by nop also worry me. >> >> Your patch was about visibility. How does the more aggressive > > ipa-visibility is a

Re: ipa-visibility TLC 2/n

2014-06-11 Thread Jan Hubicka
Deavid, this is patch to disable the vtable rewriting on AIX. I did not make much progress on figuring out why it fails today - just observed that if I produce .o file for the test and link it against libstdc++ built by older GCC it works. Also objects compiled w/o optimization works, so I am b

Re: ipa-visibility TLC 2/n

2014-06-10 Thread Jan Hubicka
> Honza, > > I am not sure that the problem is caused only by aliases and thunks. > The large increase in AIX linker warnings about branches not followed > by nop also worry me. > > Your patch was about visibility. How does the more aggressive ipa-visibility is a pass that basically bring extern

Re: ipa-visibility TLC 2/n

2014-06-10 Thread David Edelsohn
On Tue, Jun 10, 2014 at 2:02 PM, Jan Hubicka wrote: >> Honza, >> >> Thanks for this patch which improves some of the G++ testsuite >> failures, but most of the libstdc++ testsuite continues to fail on >> AIX. > > Yep, I am still looking into this. Just made new alias verifier that > catches quite

Re: ipa-visibility TLC 2/n

2014-06-10 Thread Jan Hubicka
> Honza, > > Thanks for this patch which improves some of the G++ testsuite > failures, but most of the libstdc++ testsuite continues to fail on > AIX. Yep, I am still looking into this. Just made new alias verifier that catches quite few nonsenses in how C++ builds thunks and same body aliases.

Re: ipa-visibility TLC 2/n

2014-06-10 Thread David Edelsohn
On Sun, Jun 8, 2014 at 12:58 PM, Jan Hubicka wrote: > Hi, > this is the last part. It makes DECL_VIRTUAL to be copied when creating > aliases. This is > needed to make sanity check in gimple-fold happy (it checks that vtables are > DECL_VIRTUAL). > It also resets initializers of aliases to sav

Re: ipa-visibility TLC 2/n

2014-06-10 Thread Richard Biener
On Sun, Jun 8, 2014 at 6:44 PM, Jan Hubicka wrote: >> Honza, >> >> I finally was able to bootstrap GCC on AIX yesterday. The bootstrap >> works, but the testsuite results are in extremely bad shape: 250 >> failures in G++ testsuite and 470 failures in libstdc++ testsuite. > > David, this is first

Re: ipa-visibility TLC 2/n

2014-06-08 Thread Jan Hubicka
Hi, this is the last part. It makes DECL_VIRTUAL to be copied when creating aliases. This is needed to make sanity check in gimple-fold happy (it checks that vtables are DECL_VIRTUAL). It also resets initializers of aliases to save memory. Bootstrapped/regtested rs6000-aix, comitted. Index: s

Re: ipa-visibility TLC 2/n

2014-06-08 Thread Jan Hubicka
Hi, this is third part - it fixes handling of aliases in the anchor sections by recursing in place_block_symbol as discussed and also fixing one case where we lookup attribute instead of using symbol table * varasm.c (use_blocks_for_decl_p): Check symbol table instead of alias attr

Re: ipa-visibility TLC 2/n

2014-06-08 Thread Jan Hubicka
Hi, this is second part of fix - it just makes ipa-visibility to work less hard when initializer already contains local aliases. I noticed this when debugging the original issue. Bootstrapped/regtested rs6000-aix, comitted. Honza * ipa-visibility.c: Include varasm.h (can_replac

Re: ipa-visibility TLC 2/n

2014-06-08 Thread Jan Hubicka
> Honza, > > I finally was able to bootstrap GCC on AIX yesterday. The bootstrap > works, but the testsuite results are in extremely bad shape: 250 > failures in G++ testsuite and 470 failures in libstdc++ testsuite. David, this is first of the AIX fixes. It makes aliases to be output after thunk

Re: ipa-visibility TLC 2/n

2014-06-06 Thread David Edelsohn
On Fri, Jun 6, 2014 at 3:09 AM, Jan Hubicka wrote: > sorry for taking time to get back to it. I went through the code and see no > obvious flaws > except that I am somewhat concerned what happens with local aliases into the > anchors. > The problem however does not seem to be caused by it. I

Re: ipa-visibility TLC 2/n

2014-06-06 Thread Jan Hubicka
> Honza, > > How can we make further progress with the large regression on AIX? David, sorry for taking time to get back to it. I went through the code and see no obvious flaws except that I am somewhat concerned what happens with local aliases into the anchors. The problem however does not see

Re: ipa-visibility TLC 2/n

2014-06-03 Thread David Edelsohn
Honza, How can we make further progress with the large regression on AIX? Thanks, David On Fri, May 30, 2014 at 1:24 PM, David Edelsohn wrote: > Honza, > > For example g++.dg/abi/vcall1.C fails at a call in a "localalias" > function, which jumps to a bad location: > > > (gdb) up > #1 0x14c

Re: ipa-visibility TLC 2/n

2014-05-31 Thread David Edelsohn
This leads to bootstrap errors like: In file included from /tmp/20140531/powerpc-ibm-aix7.1.0.0/libstdc++-v3/include/backward/strstream:54:0, from /nasfarm/edelsohn/src/src/libstdc++-v3/src/c++98/strstream.cc:44: /tmp/20140531/powerpc-ibm-aix7.1.0.0/libstdc++-v3/include/istream: I

Re: ipa-visibility TLC 2/n

2014-05-31 Thread Richard Sandiford
David Edelsohn writes: > Honza, > > With the patch, I cannot bootstrap. I think it was meant to be: place_block_symbol (target); rather than: place_block_symbol (symbol); I.e. we need to place "target" before copying its offset. Thanks, Richard

Re: ipa-visibility TLC 2/n

2014-05-30 Thread David Edelsohn
Honza, With the patch, I cannot bootstrap. I am concerned about the much greater frequency of AIX linker warnings about branch not followed by no-op after your patch. GCC may bootstrap only because it links libstdc++ statically. If your patch is too aggressive in its effort to remove PLT calls,

Re: ipa-visibility TLC 2/n

2014-05-30 Thread Jan Hubicka
> Honza, > > For example g++.dg/abi/vcall1.C fails at a call in a "localalias" > function, which jumps to a bad location: > > > (gdb) up > #1 0x14c0 in B::B() [clone .localalias.2] () > (gdb) x/16i $pc-32 >0x14a0 <_ZN1BC2Ev+156>: add r10,r10,r8 >0x14a4 <_ZN1BC2Ev+160>:

Re: ipa-visibility TLC 2/n

2014-05-30 Thread David Edelsohn
Honza, For example g++.dg/abi/vcall1.C fails at a call in a "localalias" function, which jumps to a bad location: (gdb) up #1 0x14c0 in B::B() [clone .localalias.2] () (gdb) x/16i $pc-32 0x14a0 <_ZN1BC2Ev+156>: add r10,r10,r8 0x14a4 <_ZN1BC2Ev+160>: mr r3,r10 0x1

Re: ipa-visibility TLC 2/n

2014-05-30 Thread Ramana Radhakrishnan
On Thu, May 29, 2014 at 3:17 PM, Yufeng Zhang wrote: > Hi Honza, > > I can confirm that with your commit r211045 the arm-none-linux-gnueabi{hf} > builds are OK now. Thanks for the fix. Testsuite regressions like FAIL: g++.dg/ipa/devirt-21.C -std=gnu++1y (test for excess errors) Excess errors:

Re: ipa-visibility TLC 2/n

2014-05-30 Thread David Edelsohn
Honza, I finally was able to bootstrap GCC on AIX yesterday. The bootstrap works, but the testsuite results are in extremely bad shape: 250 failures in G++ testsuite and 470 failures in libstdc++ testsuite. G++ previously had about 65 failures, mainly TLS and init. libstdc++ previously hovered ar

Re: ipa-visibility TLC 2/n

2014-05-30 Thread Richard Sandiford
Jan Hubicka writes: >> Jan Hubicka writes: >> >> Richard Sandiford wrote the original section anchors implementation, >> >> so he would be a good person to comment about the interaction between >> >> aliases and section anchors. >> > >> > Thanks! Richard, does this patch seem sane? >> >> Looks g

Re: ipa-visibility TLC 2/n

2014-05-29 Thread Jan Hubicka
> Jan Hubicka writes: > >> Richard Sandiford wrote the original section anchors implementation, > >> so he would be a good person to comment about the interaction between > >> aliases and section anchors. > > > > Thanks! Richard, does this patch seem sane? > > Looks good to me in principle, but w

Re: ipa-visibility TLC 2/n

2014-05-29 Thread Yufeng Zhang
Hi Honza, I can confirm that with your commit r211045 the arm-none-linux-gnueabi{hf} builds are OK now. Thanks for the fix. Yufeng On 05/28/14 22:56, Jan Hubicka wrote: Any update? I've managed to generate a simple test case from libstdc++-v3/src/c++98/strstream.cc which reproduces the iss

Re: ipa-visibility TLC 2/n

2014-05-29 Thread Richard Sandiford
Jan Hubicka writes: >> Richard Sandiford wrote the original section anchors implementation, >> so he would be a good person to comment about the interaction between >> aliases and section anchors. > > Thanks! Richard, does this patch seem sane? Looks good to me in principle, but with: > + s

Re: ipa-visibility TLC 2/n

2014-05-28 Thread Jan Hubicka
> Richard Sandiford wrote the original section anchors implementation, > so he would be a good person to comment about the interaction between > aliases and section anchors. Thanks! Richard, does this patch seem sane? AIX gcc now builds for me, so I will test it on x86_64-linux it and commit if i

Re: ipa-visibility TLC 2/n

2014-05-28 Thread David Edelsohn
On Wed, May 28, 2014 at 6:31 PM, Jan Hubicka wrote: >> Honza, >> >> I'm glad that you're making progress. >> >> > David, this looks like a bug in the AIX target output macros. I get: >> > .set >> > _ZTCSt14basic_ifstreamIcSt11char_traitsIcEE0_Si.localalias.69,_ZTCSt14basic_ifstreamIcSt11c

Re: ipa-visibility TLC 2/n

2014-05-28 Thread Jan Hubicka
> Honza, > > I'm glad that you're making progress. > > > David, this looks like a bug in the AIX target output macros. I get: > > .set > > _ZTCSt14basic_ifstreamIcSt11char_traitsIcEE0_Si.localalias.69,_ZTCSt14basic_ifstreamIcSt11char_traitsIcEE0_Si > > > (this is correct since localalia

Re: ipa-visibility TLC 2/n

2014-05-28 Thread Jan Hubicka
> Any update? > > I've managed to generate a simple test case from > libstdc++-v3/src/c++98/strstream.cc which reproduces the issue on > ARM that Ramana has reported previously: > > > template struct char_traits; > > template > class basic_ios > { > }; > > template > > class basic_istream : v

Re: ipa-visibility TLC 2/n

2014-05-28 Thread David Edelsohn
Honza, I'm glad that you're making progress. > David, this looks like a bug in the AIX target output macros. I get: > .set > _ZTCSt14basic_ifstreamIcSt11char_traitsIcEE0_Si.localalias.69,_ZTCSt14basic_ifstreamIcSt11char_traitsIcEE0_Si > (this is correct since localalias is really an ali

Re: ipa-visibility TLC 2/n

2014-05-28 Thread Jan Hubicka
> On 05/27/14 23:20, Jan Hubicka wrote: > >> > >>here we have decl and its local alias: > >>(gdb) p debug_tree (sect->named.decl) > >> >> type >> type >> 700f57e0> > >> unsigned SI > >> size > >> unit size > >> align 32 symtab 45 alias s

Re: ipa-visibility TLC 2/n

2014-05-28 Thread Yufeng Zhang
On 05/27/14 23:20, Jan Hubicka wrote: here we have decl and its local alias: (gdb) p debug_tree (sect->named.decl) unsigned SI size unit size align 32 symtab 45 alias set 3 canonical type 700f5840 pointer_to_this> BLK

Re: ipa-visibility TLC 2/n

2014-05-27 Thread Jan Hubicka
> > here we have decl and its local alias: > (gdb) p debug_tree (sect->named.decl) > type type 700f57e0> > unsigned SI > size > unit size > align 32 symtab 45 alias set 3 canonical type 700f5840 > pointer_to_this > >

Re: ipa-visibility TLC 2/n

2014-05-27 Thread Jan Hubicka
> > Sadly this doesn't appear to have fixed the issue. I have now reproduced it on AIX. We die at: /* Sanity check user variables for flag changes. */ if (sect->named.decl != NULL && DECL_P (sect->named.decl) && decl != sect->named.decl)

Re: ipa-visibility TLC 2/n

2014-05-26 Thread Martin Liška
On 05/25/2014 07:54 AM, Jan Hubicka wrote: Hi, this patch adds code to rerite references in vtable initializers to local aliases when doing so is a win. Bootstrapped/regtested x86_64-linux, comitted. Honza * ipa-visibility.c (can_replace_by_local_alias_in_vtable): New function.

Re: ipa-visibility TLC 2/n

2014-05-25 Thread Ramana Radhakrishnan
On Mon, May 26, 2014 at 2:04 AM, Jan Hubicka wrote: >> > On Sun, May 25, 2014 at 6:54 AM, Jan Hubicka wrote: >> > > Hi, >> > > this patch adds code to rerite references in vtable initializers to >> > > local aliases >> > > when doing so is a win. >> > > >> > > Bootstrapped/regtested x86_64-linux

Re: ipa-visibility TLC 2/n

2014-05-25 Thread Jan Hubicka
> > On Sun, May 25, 2014 at 6:54 AM, Jan Hubicka wrote: > > > Hi, > > > this patch adds code to rerite references in vtable initializers to local > > > aliases > > > when doing so is a win. > > > > > > Bootstrapped/regtested x86_64-linux, comitted. > > > > This is the most likely patch to have c

Re: ipa-visibility TLC 2/n

2014-05-25 Thread Jan Hubicka
> On Sun, May 25, 2014 at 6:54 AM, Jan Hubicka wrote: > > Hi, > > this patch adds code to rerite references in vtable initializers to local > > aliases > > when doing so is a win. > > > > Bootstrapped/regtested x86_64-linux, comitted. > > This is the most likely patch to have caused build failur

Re: ipa-visibility TLC 2/n

2014-05-25 Thread Ramana Radhakrishnan
On Sun, May 25, 2014 at 6:54 AM, Jan Hubicka wrote: > Hi, > this patch adds code to rerite references in vtable initializers to local > aliases > when doing so is a win. > > Bootstrapped/regtested x86_64-linux, comitted. This is the most likely patch to have caused build failures on arm-linux-gn

ipa-visibility TLC 2/n

2014-05-24 Thread Jan Hubicka
Hi, this patch adds code to rerite references in vtable initializers to local aliases when doing so is a win. Bootstrapped/regtested x86_64-linux, comitted. Honza * ipa-visibility.c (can_replace_by_local_alias_in_vtable): New function. (update_vtable_references): New function.