Re: Fix class type lookup from OBJ_TYPE_REF

2013-08-17 Thread Jan Hubicka
> This patch causes an ICE when building libobjc, which is part of > normal bootstrap. > > PR 58179 > > /nasfarm/edelsohn/src/src/libobjc/accessors.m: In function 'objc_getProperty': > /nasfarm/edelsohn/src/src/libobjc/accessors.m:127:11: internal > compiler error: in obj_type_ref_class, at tree.

Go patch committed: Don't generate range value for sink

2013-08-17 Thread Ian Lance Taylor
This patch from Chris Manghane fixes a bug when the value in a range clause is a sink variable. It's fixedbugs/bug454.go in the master Go testsuite, and will appear in the gccgo testsuite in due course. Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu. Committed to mainline and 4.8 br

Re: Fix class type lookup from OBJ_TYPE_REF

2013-08-17 Thread Jan Hubicka
Hi, this is the patch I comitted after testing. My apologizes for the breakage. Honza Index: ChangeLog === --- ChangeLog (revision 201816) +++ ChangeLog (working copy) @@ -1,3 +1,8 @@ +2013-08-16 Jan Hubicka + + PR middl

Type inheritance graph analysis & speculative devirtualization, part 1/6

2013-08-17 Thread Jan Hubicka
Hi, I have got the ipa-devirt implementation into shape it seems actually useful and working as expected. The main selling point of it for the moment is compile time of C++ programs (especially with LTO) and verification facilities. Currently we keep all virtual functions in the callgraph until a

Re: [PATCH] Sanitize block partitioning under -freorder-blocks-and-partition

2013-08-17 Thread Jan Hubicka
> > I added both of these and ran into issues due to profile maintenance. > For example, there were non-zero blocks in the cold section because > pro_and_epilogue split a simple return block that was previously reach > by both hot and cold paths. The new return block that was then only > reached v

Re: Fix class type lookup from OBJ_TYPE_REF

2013-08-17 Thread Gerald Pfeifer
On Sat, 17 Aug 2013, Jan Hubicka wrote: > this is the patch I comitted after testing. > My apologizes for the breakage. > > +2013-08-16 Jan Hubicka > + > + PR middle-end/58179 > + * tree.c (obj_type_ref_class): Do not ICE on non-method calls. This fixes my bootstraps on {amd64,i386}-un

[RFC] Issues with intraprocedural devirtualization

2013-08-17 Thread Jan Hubicka
Hi, this patch tries to make gimple_extract_devirt_binfo_from_cst little bit more sane and make it match bit more cases. Currently we seem to be able to devirtualize only if the type in question has no basetypes (not even some not having virtual methods at all) and it is the initial type implement

Re: [RFC] Issues with intraprocedural devirtualization

2013-08-17 Thread Jason Merrill
On 08/17/2013 05:44 PM, Jan Hubicka wrote: 1) we want the type to not have base because we may have inlined the constructor. During construction the vtables are filled by base's vtable and thus we can not simply devirtualize based on the final virtual table without proving that

C++ PATCH for c++/58083 (ICE with lambda in default argument)

2013-08-17 Thread Jason Merrill
The standard says that lambdas go in the enclosing block, class or namespace scope, but also that default arguments aren't parsed until the class is complete. So we need to accept pushing a lambda into a complete class. Tested x86_64-pc-linux-gnu, applying to trunk and 4.8. commit a3eed6be088

Re: [RFC] Issues with intraprocedural devirtualization

2013-08-17 Thread Gabriel Dos Reis
On Sat, Aug 17, 2013 at 7:56 PM, Jason Merrill wrote: >> I do not know if one can do >> something like having automatic variable of class A and use placement new >> to change it to class B. > > > This is something of a grey area in the standard, with a few defect reports > yet to be resolved. I

C++ PATCH for c++/58119 (possibly wrong error with conversion template)

2013-08-17 Thread Jason Merrill
In this testcase, the A conversion template can't possibly produce a pointer type, so its presence in the overload set shouldn't cause an error. The standard is unclear about the B case, but it seems appropriate to me to still complain there. Tested x86_64-pc-linux-gnu, applying to trunk, 4.8

Re: [RFC] Issues with intraprocedural devirtualization

2013-08-17 Thread Richard Biener
Jason Merrill wrote: >On 08/17/2013 05:44 PM, Jan Hubicka wrote: >> 1) we want the type to not have base because we may have inlined >the constructor. >> During construction the vtables are filled by base's vtable and >thus we can >> not simply devirtualize based on the final virtual t