[PATCH] Giant concepts patch

Jason Merrill jason@redhat.com
Tue Jun 21 18:53:00 GMT 2016


I've pushed my work-in-progress integration branch to jason/concepts-rewrite.

Jason


On Mon, Jun 20, 2016 at 4:28 PM, Jason Merrill <jason@redhat.com> wrote:
> On Fri, Mar 25, 2016 at 1:33 AM, Andrew Sutton
> <andrew.n.sutton@gmail.com> wrote:
>> I'll just leave this here...
>>
>> This patch significantly improves performance with concepts (i.e.,
>> makes it actually usable for real systems) and improves the
>> specificity of diagnostics when constraints fail.
>>
>> Unfortunately, this isn't easily submittable in small pieces because
>> it completely replaces most of the core processing routines for
>> constraints, including (essentially) a complete rewrite of logic.cc
>> and the diagnostics in constraint.cc. More perfective work could be
>> done related to diagnostics, but this needs to be applied first.
>>
>> As part of the patch, I added timevars for constraint satisfaction and
>> subsumption. In template-heavy coe (~80KLOC), I'm seeing satisfaction
>> account for ~6% of compilation time and subsumption ~2%. Template
>> instantiation remains ~35%, but I think there's still room for
>> improvement in concepts. It just requires experimentation.
>>
>> Tests involving significant number of disjunctions have yet to
>> register > 1% of compilation time spent in subsumption, but I'm still
>> testing.
>
> Thanks, I've been working on integrating this patch, hoping to have it
> in for 6.2.  Have you done more work on it since you sent this out?
>
> A few issues:
>
> I've run into some trouble building cmcstl2: declarator requirements
> on a function can lead to constraints that tsubst_constraint doesn't
> handle.  What was your theory of only handling a few _CONSTR codes
> there?  This is blocking me from checking in the patch.
>
> Adding gcc_unreachable to the ARGUMENT_PACK_SELECT handling in concept
> arg hash/compare doesn't seem to break anything in either the GCC
> testsuite or your stl2.  Do you have a testcase where that code is
> still needed?
>
>> Also, it might be worth noting that partial specialization of variable
>> templates is currently broken. We don't seem to be emitting template
>> arguments as part of the mangled name, leading to lots and lots of
>> late redefinition errors.
>
> This should be fixed now.
>
> Jason



More information about the Gcc-patches mailing list