Re: Patch RFA: Add option -fcollectible-pointers, use it in ivopts

2016-01-27 Thread Ian Lance Taylor
On Wed, Jan 27, 2016 at 7:24 AM, Bernd Schmidt wrote: > On 01/27/2016 04:18 PM, Ian Lance Taylor wrote: >> >> On Wed, Jan 27, 2016 at 7:16 AM, Bernd Schmidt >> wrote: >>> >>> >>> Still, I feel uncomfortable about making a promise we don't really expect >>> to >>> fully keep yet, so I would prefer

Re: Patch RFA: Add option -fcollectible-pointers, use it in ivopts

2016-01-27 Thread Bernd Schmidt
On 01/27/2016 04:18 PM, Ian Lance Taylor wrote: On Wed, Jan 27, 2016 at 7:16 AM, Bernd Schmidt wrote: Still, I feel uncomfortable about making a promise we don't really expect to fully keep yet, so I would prefer this option to be undocumented for now. I won't object if someone else wants to a

Re: Patch RFA: Add option -fcollectible-pointers, use it in ivopts

2016-01-27 Thread Ian Lance Taylor
On Wed, Jan 27, 2016 at 7:16 AM, Bernd Schmidt wrote: > > Still, I feel uncomfortable about making a promise we don't really expect to > fully keep yet, so I would prefer this option to be undocumented for now. I > won't object if someone else wants to approve it as a normal option however. Are y

Re: Patch RFA: Add option -fcollectible-pointers, use it in ivopts

2016-01-27 Thread Bernd Schmidt
On 01/27/2016 02:59 PM, Ian Lance Taylor wrote: +This option is disabled by default for most languages, enabled by +default for languages that use garbage collection. This is not true as of this patch. Yes. As I said elsewhere, my intent is to do that as a separate patch. Then the followu

Re: Patch RFA: Add option -fcollectible-pointers, use it in ivopts

2016-01-27 Thread Ian Lance Taylor
On Wed, Jan 27, 2016 at 3:18 AM, Bernd Schmidt wrote: >> +This option is disabled by default for most languages, enabled by >> +default for languages that use garbage collection. > > > This is not true as of this patch. Yes. As I said elsewhere, my intent is to do that as a separate patch. >>

Re: Patch RFA: Add option -fcollectible-pointers, use it in ivopts

2016-01-27 Thread Bernd Schmidt
+This option is disabled by default for most languages, enabled by +default for languages that use garbage collection. This is not true as of this patch. Index: tree-ssa-loop-ivopts.c === --- tree-ssa-loop-ivopts.c (revision

Re: Patch RFA: Add option -fcollectible-pointers, use it in ivopts

2016-01-26 Thread Ian Lance Taylor
On Tue, Jan 26, 2016 at 8:03 AM, David Malcolm wrote: > > Is the patch missing some logic to make the option be enabled by default > for gc-using languages? (presumably go, and maybe java?) I am intentionally leaving that to a separate patch, yes. I think this option is useful by itself for C/C

Re: Patch RFA: Add option -fcollectible-pointers, use it in ivopts

2016-01-26 Thread David Malcolm
On Tue, 2016-01-26 at 05:35 -0800, Ian Lance Taylor wrote: [...] > Index: common.opt > === > --- common.opt (revision 232580) > +++ common.opt (working copy) > @@ -1380,6 +1380,10 @@ > Enable hoisting adjacent loads to encourage ge

Re: Patch RFA: Add option -fcollectible-pointers, use it in ivopts

2016-01-26 Thread Ian Lance Taylor
On Tue, Jan 26, 2016 at 4:10 AM, Bernd Schmidt wrote: > >>> On 01/23/2016 12:52 AM, Ian Lance Taylor wrote: >>> 2016-01-22 Ian Lance Taylor * common.opt (fkeep-gc-roots-live): New option. * tree-ssa-loop-ivopts.c (add_candidate_1): If -fkeep-gc-roots-live, skip pointers

Re: Patch RFA: Add option -fcollectible-pointers, use it in ivopts

2016-01-26 Thread Bernd Schmidt
On 01/25/2016 05:03 PM, Ian Lance Taylor wrote: On Mon, Jan 25, 2016 at 3:39 AM, Bernd Schmidt wrote: On 01/23/2016 12:52 AM, Ian Lance Taylor wrote: 2016-01-22 Ian Lance Taylor * common.opt (fkeep-gc-roots-live): New option. * tree-ssa-loop-ivopts.c (add_candidate_1): If -fkeep-gc-roots-

Re: Patch RFA: Add option -fcollectible-pointers, use it in ivopts

2016-01-25 Thread Ian Lance Taylor
On Mon, Jan 25, 2016 at 3:39 AM, Bernd Schmidt wrote: > On 01/23/2016 12:52 AM, Ian Lance Taylor wrote: > >> 2016-01-22 Ian Lance Taylor >> >> * common.opt (fkeep-gc-roots-live): New option. >> * tree-ssa-loop-ivopts.c (add_candidate_1): If >> -fkeep-gc-roots-live, skip pointers. >> (add_iv_can

Re: Patch RFA: Add option -fcollectible-pointers, use it in ivopts

2016-01-25 Thread Bernd Schmidt
On 01/23/2016 12:52 AM, Ian Lance Taylor wrote: 2016-01-22 Ian Lance Taylor * common.opt (fkeep-gc-roots-live): New option. * tree-ssa-loop-ivopts.c (add_candidate_1): If -fkeep-gc-roots-live, skip pointers. (add_iv_candidate_for_biv): Handle add_candidate_1 returning NULL. * doc/invoke.texi

Re: Patch RFA: Add option -fcollectible-pointers, use it in ivopts

2016-01-24 Thread Ian Lance Taylor
On Sat, Jan 23, 2016 at 5:42 PM, Sandra Loosemore wrote: > > I think these option descriptions are supposed to end in a period. Thanks for the doc comments; will fix before submitting if the overall patch is approved. Ian

Re: Patch RFA: Add option -fcollectible-pointers, use it in ivopts

2016-01-23 Thread Sandra Loosemore
On 01/22/2016 12:03 PM, Ian Lance Taylor wrote: Index: common.opt === --- common.opt (revision 232580) +++ common.opt (working copy) @@ -1380,6 +1380,10 @@ Enable hoisting adjacent loads to encourage generating conditional move i

Re: Patch RFA: Add option -fcollectible-pointers, use it in ivopts

2016-01-22 Thread Ian Lance Taylor
On Fri, Jan 22, 2016 at 11:25 AM, Bernd Schmidt wrote: > On 01/22/2016 08:03 PM, Ian Lance Taylor wrote: >> >> Updated patch. >> >> I've verified that I'm changing the only relevant place in >> tree-ssa-loop-ivopts.c that creates a POINTER_PLUS_EXPR, so I do think >> that this is the only changed

Re: Patch RFA: Add option -fcollectible-pointers, use it in ivopts

2016-01-22 Thread Bernd Schmidt
On 01/22/2016 08:03 PM, Ian Lance Taylor wrote: Updated patch. I've verified that I'm changing the only relevant place in tree-ssa-loop-ivopts.c that creates a POINTER_PLUS_EXPR, so I do think that this is the only changed to fix the problem for ivopts. I don't think so. One of the problems wi

Re: Patch RFA: Add option -fcollectible-pointers, use it in ivopts

2016-01-22 Thread Ian Lance Taylor
Updated patch. I've verified that I'm changing the only relevant place in tree-ssa-loop-ivopts.c that creates a POINTER_PLUS_EXPR, so I do think that this is the only changed to fix the problem for ivopts. OK for mainline? Ian gcc/ChangeLog: 2016-01-22 Ian Lance Taylor * common.opt (fkeep-

Re: Patch RFA: Add option -fcollectible-pointers, use it in ivopts

2016-01-20 Thread Richard Biener
On Wed, Jan 20, 2016 at 3:02 PM, Ian Lance Taylor wrote: > On Wed, Jan 20, 2016 at 3:13 AM, Richard Biener > wrote: >> On Wed, Jan 20, 2016 at 6:48 AM, Ian Lance Taylor wrote: >>> As discussed at https://gcc.gnu.org/ml/gcc/2016-01/msg00023.html , the >>> Go frontend needs some way to prevent ivo

Re: Patch RFA: Add option -fcollectible-pointers, use it in ivopts

2016-01-20 Thread Ian Lance Taylor
On Wed, Jan 20, 2016 at 3:13 AM, Richard Biener wrote: > On Wed, Jan 20, 2016 at 6:48 AM, Ian Lance Taylor wrote: >> As discussed at https://gcc.gnu.org/ml/gcc/2016-01/msg00023.html , the >> Go frontend needs some way to prevent ivopts from temporarily removing >> all pointers into a memory block

Re: Patch RFA: Add option -fcollectible-pointers, use it in ivopts

2016-01-20 Thread Richard Biener
On Wed, Jan 20, 2016 at 6:48 AM, Ian Lance Taylor wrote: > As discussed at https://gcc.gnu.org/ml/gcc/2016-01/msg00023.html , the > Go frontend needs some way to prevent ivopts from temporarily removing > all pointers into a memory block. This patch adds a new option > -fcollectible-pointers whic

Patch RFA: Add option -fcollectible-pointers, use it in ivopts

2016-01-19 Thread Ian Lance Taylor
As discussed at https://gcc.gnu.org/ml/gcc/2016-01/msg00023.html , the Go frontend needs some way to prevent ivopts from temporarily removing all pointers into a memory block. This patch adds a new option -fcollectible-pointers which makes that happen. This is not the best way to solve the proble