Re: [C++ PATCH] Reimplement ADL

2017-05-26 Thread Jakub Jelinek
On Fri, May 26, 2017 at 07:35:47AM -0400, Nathan Sidwell wrote: > On 05/26/2017 03:54 AM, Jakub Jelinek wrote: > > On Thu, May 25, 2017 at 09:03:31AM -0400, Nathan Sidwell wrote: > > > This patch reimplements ADL. > > > I believe this broke > > FAIL: libgomp.c++/udr-12.C (test for excess errors) >

Re: [C++ PATCH] Reimplement ADL

2017-05-26 Thread Nathan Sidwell
On 05/26/2017 03:54 AM, Jakub Jelinek wrote: On Thu, May 25, 2017 at 09:03:31AM -0400, Nathan Sidwell wrote: This patch reimplements ADL. I believe this broke FAIL: libgomp.c++/udr-12.C (test for excess errors) UNRESOLVED: libgomp.c++/udr-12.C compilation failed to produce executable In ans

Re: [C++ PATCH] Reimplement ADL

2017-05-26 Thread Jakub Jelinek
On Thu, May 25, 2017 at 09:03:31AM -0400, Nathan Sidwell wrote: > This patch reimplements ADL. > > I replace the existing adl_lookup object with a new name_lookup object, and > move all the workers into it as member fns. > > In terms of implementation, ADL requires us to look in a bunch of places

Re: [C++ PATCH] Reimplement ADL

2017-05-25 Thread Nathan Sidwell
On 05/25/2017 03:07 PM, Jason Merrill wrote: The recursion is a rare event, so we optimize the non-recursive case. Sounds like it would make sense to use a hash_set rather than flags on the decls. I don't think that would be a win. Although both are O(1), the constant factor is greater for

Re: [C++ PATCH] Reimplement ADL

2017-05-25 Thread Jason Merrill
On Thu, May 25, 2017 at 9:03 AM, Nathan Sidwell wrote: > Anyway, this implementation introduces LOOKUP_SEEN_P and LOOKUP_FOUND_P to > directly mark the DECL node. Hence determination is now O(1) rather than > O(N^2). We still have a vector to recall which decls we need to unmark at > the end of