Re: Revert "[nvptx, libgomp] Update pr85381-{2,4}.c test-cases" [PR89713, PR94392] (was: [PATCH][RFC] c/94392 - only enable -ffinite-loops for C++)

2020-10-30 Thread Jakub Jelinek via Gcc-patches
On Fri, Oct 30, 2020 at 03:09:31PM +0100, Thomas Schwinge wrote: > On 2020-04-03T13:34:18+0200, Jakub Jelinek wrote: > > Dunno about OpenACC, but OpenMP loops guarantee finiteness, as the number of > > iterations must be computable before the loop and must fit into the type in > > which that count

Re: Revert "[nvptx, libgomp] Update pr85381-{2, 4}.c test-cases" [PR89713, PR94392] (was: [PATCH][RFC] c/94392 - only enable -ffinite-loops for C++)

2020-10-30 Thread Thomas Schwinge
Hi! Frederik stumbled over a related thing. On 2020-04-03T12:36:29+0200, Richard Biener wrote: > On Fri, 3 Apr 2020, Thomas Schwinge wrote: >> On 2020-04-02T11:12:48+0200, Richard Biener wrote: >> > On Wed, 1 Apr 2020, Jason Merrill wrote: >> > >> >> On 4/1/20 9:36 AM, Richard Biener wrote: >>

Re: Revert "[nvptx, libgomp] Update pr85381-{2,4}.c test-cases" [PR89713, PR94392] (was: [PATCH][RFC] c/94392 - only enable -ffinite-loops for C++)

2020-04-03 Thread Jakub Jelinek via Gcc-patches
On Fri, Apr 03, 2020 at 11:36:29AM +0200, Richard Biener wrote: > Note there's now also the opportunity to set the loop flag for > OpenACC/OpenMP annotated loops if any of that guarantees finiteness. > (for GCC11 only please) Dunno about OpenACC, but OpenMP loops guarantee finiteness, as the numbe

Re: Revert "[nvptx, libgomp] Update pr85381-{2,4}.c test-cases" [PR89713, PR94392] (was: [PATCH][RFC] c/94392 - only enable -ffinite-loops for C++)

2020-04-03 Thread Richard Biener
On Fri, 3 Apr 2020, Thomas Schwinge wrote: > Hi! > > On 2020-04-02T11:12:48+0200, Richard Biener wrote: > > On Wed, 1 Apr 2020, Jason Merrill wrote: > > > >> On 4/1/20 9:36 AM, Richard Biener wrote: > >> > This does away with enabling -ffinite-loops at -O2+ for all languages > >> > and instead e

Revert "[nvptx, libgomp] Update pr85381-{2, 4}.c test-cases" [PR89713, PR94392] (was: [PATCH][RFC] c/94392 - only enable -ffinite-loops for C++)

2020-04-03 Thread Thomas Schwinge
Hi! On 2020-04-02T11:12:48+0200, Richard Biener wrote: > On Wed, 1 Apr 2020, Jason Merrill wrote: > >> On 4/1/20 9:36 AM, Richard Biener wrote: >> > This does away with enabling -ffinite-loops at -O2+ for all languages >> > and instead enables it selectively for C++ only. > I'm retesting the fol

Re: [PATCH][RFC] c/94392 - only enable -ffinite-loops for C++

2020-04-02 Thread Richard Biener
On Thu, 2 Apr 2020, Jakub Jelinek wrote: > On Thu, Apr 02, 2020 at 11:12:48AM +0200, Richard Biener wrote: > > > "The implementation may assume that any thread will eventually do one of > > > the > > > following: > > > — terminate, > > > — make a call to a library I/O function, > > > — perform

Re: [PATCH][RFC] c/94392 - only enable -ffinite-loops for C++

2020-04-02 Thread Jakub Jelinek via Gcc-patches
On Thu, Apr 02, 2020 at 11:12:48AM +0200, Richard Biener wrote: > > "The implementation may assume that any thread will eventually do one of the > > following: > > — terminate, > > — make a call to a library I/O function, > > — perform an access through a volatile glvalue, or > > — perform a sy

Re: [PATCH][RFC] c/94392 - only enable -ffinite-loops for C++

2020-04-02 Thread Richard Biener
On Wed, 1 Apr 2020, Jason Merrill wrote: > On 4/1/20 9:36 AM, Richard Biener wrote: > > This does away with enabling -ffinite-loops at -O2+ for all languages > > and instead enables it selectively for C++ only. > > > > Jason, I didn't find a reference as to when the forward progress > > guarantee

Re: [PATCH][RFC] c/94392 - only enable -ffinite-loops for C++

2020-04-01 Thread Jason Merrill via Gcc-patches
On 4/1/20 9:36 AM, Richard Biener wrote: This does away with enabling -ffinite-loops at -O2+ for all languages and instead enables it selectively for C++ only. Jason, I didn't find a reference as to when the forward progress guarantee was introduced to C++ so I randomly chose C++11, is that corr

Re: [PATCH][RFC] c/94392 - only enable -ffinite-loops for C++

2020-04-01 Thread Richard Biener
On Wed, 1 Apr 2020, Jan Hubicka wrote: > > On Wed, 1 Apr 2020, Jakub Jelinek wrote: > > > > > On Wed, Apr 01, 2020 at 03:36:30PM +0200, Richard Biener wrote: > > > > @@ -512,7 +512,10 @@ can_inline_edge_by_limits_p (struct cgraph_edge > > > > *e, bool report, > > > > /* When devirt

Re: [PATCH][RFC] c/94392 - only enable -ffinite-loops for C++

2020-04-01 Thread Jan Hubicka
> On Wed, 1 Apr 2020, Jakub Jelinek wrote: > > > On Wed, Apr 01, 2020 at 03:36:30PM +0200, Richard Biener wrote: > > > @@ -512,7 +512,10 @@ can_inline_edge_by_limits_p (struct cgraph_edge *e, > > > bool report, > > > /* When devirtualization is disabled for callee, it is not safe > > >

Re: [PATCH][RFC] c/94392 - only enable -ffinite-loops for C++

2020-04-01 Thread Richard Biener
On Wed, 1 Apr 2020, Jakub Jelinek wrote: > On Wed, Apr 01, 2020 at 03:36:30PM +0200, Richard Biener wrote: > > @@ -512,7 +512,10 @@ can_inline_edge_by_limits_p (struct cgraph_edge *e, > > bool report, > > /* When devirtualization is disabled for callee, it is not safe > > t

Re: [PATCH][RFC] c/94392 - only enable -ffinite-loops for C++

2020-04-01 Thread Jakub Jelinek via Gcc-patches
On Wed, Apr 01, 2020 at 03:36:30PM +0200, Richard Biener wrote: > @@ -512,7 +512,10 @@ can_inline_edge_by_limits_p (struct cgraph_edge *e, bool > report, > /* When devirtualization is disabled for callee, it is not safe >to inline it as we possibly mangled the type info

[PATCH][RFC] c/94392 - only enable -ffinite-loops for C++

2020-04-01 Thread Richard Biener
This does away with enabling -ffinite-loops at -O2+ for all languages and instead enables it selectively for C++ only. Jason, I didn't find a reference as to when the forward progress guarantee was introduced to C++ so I randomly chose C++11, is that correct? Joseph, this simply never enables -ff