Re: [PATCH v5 2/5] C++: Support clang compatible [[musttail]] (PR83324)

2024-05-21 Thread Jason Merrill
On 5/14/24 19:23, Andi Kleen wrote: You need a template testcase; I expect it doesn't work in templates with the current patch. It's probably enough to copy it in tsubst_expr where we currently propagate CALL_EXPR_OPERATOR_SYNTAX. I tried it with the appended test case, everything seems to

Re: [PATCH v5 2/5] C++: Support clang compatible [[musttail]] (PR83324)

2024-05-14 Thread Andi Kleen
> > > You need a template testcase; I expect it doesn't work in templates with > > > the > > > current patch. It's probably enough to copy it in tsubst_expr where we > > > currently propagate CALL_EXPR_OPERATOR_SYNTAX. > > > > I tried it with the appended test case, everything seems to work

Re: [PATCH v5 2/5] C++: Support clang compatible [[musttail]] (PR83324)

2024-05-14 Thread Jason Merrill
On 5/14/24 13:24, Andi Kleen wrote: Hi Jason, On Mon, May 06, 2024 at 11:02:20PM -0400, Jason Merrill wrote: @@ -30189,7 +30207,7 @@ cp_parser_std_attribute (cp_parser *parser, tree attr_ns) /* Maybe we don't expect to see any arguments for this attribute. */ const

Re: [PATCH v5 2/5] C++: Support clang compatible [[musttail]] (PR83324)

2024-05-14 Thread Andi Kleen
Hi Jason, On Mon, May 06, 2024 at 11:02:20PM -0400, Jason Merrill wrote: > > @@ -30189,7 +30207,7 @@ cp_parser_std_attribute (cp_parser *parser, tree > > attr_ns) > > /* Maybe we don't expect to see any arguments for this attribute. */ > > const attribute_spec *as > > =

Re: [PATCH v5 2/5] C++: Support clang compatible [[musttail]] (PR83324)

2024-05-06 Thread Jason Merrill
On 5/5/24 14:14, Andi Kleen wrote: This patch implements a clang compatible [[musttail]] attribute for returns. Thanks. musttail is useful as an alternative to computed goto for interpreters. With computed goto the interpreter function usually ends up very big which causes problems with

[PATCH v5 2/5] C++: Support clang compatible [[musttail]] (PR83324)

2024-05-05 Thread Andi Kleen
This patch implements a clang compatible [[musttail]] attribute for returns. musttail is useful as an alternative to computed goto for interpreters. With computed goto the interpreter function usually ends up very big which causes problems with register allocation and other per function