Re: [PATCH] Add -Wdisabled-optimization warning for not optimizing sibling calls

2023-08-21 Thread Richard Biener via Gcc-patches
On Fri, Aug 18, 2023 at 7:13 PM Bradley Lucier wrote: > > On 8/17/23 3:54 AM, Richard Biener wrote: > > I think it needs a new category, 'inline' is probably the "closest" > > existing one > > but that also tends to be noisy. Maybe 'call' would be a good name? We > > could > > report things li

Re: [PATCH] Add -Wdisabled-optimization warning for not optimizing sibling calls

2023-08-18 Thread Bradley Lucier via Gcc-patches
On 8/17/23 3:54 AM, Richard Biener wrote: I think it needs a new category, 'inline' is probably the "closest" existing one but that also tends to be noisy. Maybe 'call' would be a good name? We could report things like tail-recursion optimization, tail-calling and sibling calling optimizations

Re: [PATCH] Add -Wdisabled-optimization warning for not optimizing sibling calls

2023-08-17 Thread Richard Biener via Gcc-patches
On Wed, Aug 16, 2023 at 12:48 AM Bradley Lucier wrote: > > First, if this is no longer the appropriate group for this discussion, > please tell me where to send it. > > I've been working to understand all the comments here. From them, I think: > > 1. It's OK to have gcc report back to the user w

Re: [PATCH] Add -Wdisabled-optimization warning for not optimizing sibling calls

2023-08-15 Thread Bradley Lucier via Gcc-patches
First, if this is no longer the appropriate group for this discussion, please tell me where to send it. I've been working to understand all the comments here. From them, I think: 1. It's OK to have gcc report back to the user whether each particular call in tail position is optimized when -f

Re: [PATCH] Add -Wdisabled-optimization warning for not optimizing sibling calls

2023-08-08 Thread David Malcolm via Gcc-patches
On Tue, 2023-08-08 at 08:05 +0200, Richard Biener wrote: > On Mon, Aug 7, 2023 at 9:04 PM Bradley Lucier > wrote: > > > > Thank you for your comments.  I have a few questions. > > > > > I don't think this specific case qualifies for -Wdisabled- > > > optimization. > > > The diagnostic is for cas

Re: [PATCH] Add -Wdisabled-optimization warning for not optimizing sibling calls

2023-08-07 Thread Richard Biener via Gcc-patches
On Mon, Aug 7, 2023 at 9:04 PM Bradley Lucier wrote: > > Thank you for your comments. I have a few questions. > > > I don't think this specific case qualifies for -Wdisabled-optimization. > > The diagnostic is for cases the user can control and was invented > > for limits we put up for compile-ti

Re: [PATCH] Add -Wdisabled-optimization warning for not optimizing sibling calls

2023-08-07 Thread Bradley Lucier via Gcc-patches
Thank you for your comments. I have a few questions. I don't think this specific case qualifies for -Wdisabled-optimization. The diagnostic is for cases the user can control and was invented for limits we put up for compile-time and memory-usage issues where there exist --param XYZ to adjust li

Re: [PATCH] Add -Wdisabled-optimization warning for not optimizing sibling calls

2023-08-07 Thread Richard Biener via Gcc-patches
On Sat, Aug 5, 2023 at 11:54 PM David Malcolm via Gcc-patches wrote: > > On Sun, 2023-08-06 at 02:28 +0530, Prathamesh Kulkarni via Gcc-patches > wrote: > > On Fri, 4 Aug 2023 at 23:28, Bradley Lucier via Gcc-patches > > wrote: > > Hi Bradley and Prathamesh... > > > > > > > The patch at the end a

Re: [PATCH] Add -Wdisabled-optimization warning for not optimizing sibling calls

2023-08-06 Thread Bradley Lucier via Gcc-patches
On 8/5/23 5:53 PM, David Malcolm wrote: ...but the warning branch uses "warning", which implicitly uses the input_location global variable. Is the warning reported at the correct place? It's better to use warning_at and pass it the location at which the warning should be emitted. Thanks, I ch

Re: [PATCH] Add -Wdisabled-optimization warning for not optimizing sibling calls

2023-08-05 Thread David Malcolm via Gcc-patches
On Sun, 2023-08-06 at 02:28 +0530, Prathamesh Kulkarni via Gcc-patches wrote: > On Fri, 4 Aug 2023 at 23:28, Bradley Lucier via Gcc-patches > wrote: Hi Bradley and Prathamesh... > > > > The patch at the end adds a warning when a tail/sibling call cannot > > be > > optimized for various reasons.

Re: [PATCH] Add -Wdisabled-optimization warning for not optimizing sibling calls

2023-08-05 Thread Prathamesh Kulkarni via Gcc-patches
On Sun, 6 Aug 2023 at 03:07, Bradley Lucier wrote: > > On 8/5/23 4:58 PM, Prathamesh Kulkarni wrote: > > I don't have comments on the patch, but a new warning will also > > require a corresponding entry in doc/invoke.texi. > > Thank you for your comment. > > -Wdisabled-optimization is an establish

Re: [PATCH] Add -Wdisabled-optimization warning for not optimizing sibling calls

2023-08-05 Thread Bradley Lucier via Gcc-patches
On 8/5/23 4:58 PM, Prathamesh Kulkarni wrote: I don't have comments on the patch, but a new warning will also require a corresponding entry in doc/invoke.texi. Thank you for your comment. -Wdisabled-optimization is an established warning, it's just that I'd like it to apply in another circums

Re: [PATCH] Add -Wdisabled-optimization warning for not optimizing sibling calls

2023-08-05 Thread Prathamesh Kulkarni via Gcc-patches
On Fri, 4 Aug 2023 at 23:28, Bradley Lucier via Gcc-patches wrote: > > The patch at the end adds a warning when a tail/sibling call cannot be > optimized for various reasons. > > I built and tested GCC with and without the patch with configuration > > Configured with: ../../gcc-mainline/configure

[PATCH] Add -Wdisabled-optimization warning for not optimizing sibling calls

2023-08-04 Thread Bradley Lucier via Gcc-patches
The patch at the end adds a warning when a tail/sibling call cannot be optimized for various reasons. I built and tested GCC with and without the patch with configuration Configured with: ../../gcc-mainline/configure --enable-languages=c --disable-multilib --prefix=/pkgs/gcc-mainline --disable