This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch RFA: Add option -fcollectible-pointers, use it in ivopts
- From: David Malcolm <dmalcolm at redhat dot com>
- To: Ian Lance Taylor <iant at golang dot org>
- Cc: Bernd Schmidt <bschmidt at redhat dot com>, Richard Biener <richard dot guenther at gmail dot com>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 26 Jan 2016 11:03:56 -0500
- Subject: Re: Patch RFA: Add option -fcollectible-pointers, use it in ivopts
- Authentication-results: sourceware.org; auth=none
- References: <CAOyqgcW_A-wN_mAQWkO-2ChytFyKcisLeLBbRDos4v2Dk5=sTw at mail dot gmail dot com> <CAFiYyc0y=udFNjhWhzJ1v8_UG2AvkuZC-=eFuio2QYc_BWU0hg at mail dot gmail dot com> <CAOyqgcWAWr9vvqFihtar=hobZr7t1exMDQLKA2q5YJW1KWOxFA at mail dot gmail dot com> <CAFiYyc2=-oMr61Mt_i_tLShDMxLXZFhwWfX1paAYNMzWw2ASZA at mail dot gmail dot com> <CAOyqgcXr36JodbMVU-B-_TdkRsyvok=6GDLbMfXpopAjn3kkkA at mail dot gmail dot com> <56A28234 dot 4020009 at t-online dot de> <CAOyqgcXy3=ZmXCyB8f_UAt=38nJhtPX=cBTwCe0fjKJiG_2T4A at mail dot gmail dot com> <56A6096D dot 1020800 at redhat dot com> <CAOyqgcW4tkThVd=MQBWKC_7i=Y2PH4gv3JC1eP8-o=hqa3Aw-g at mail dot gmail dot com> <56A7622A dot 80808 at redhat dot com> <CAOyqgcXwk1FbGUqFkiyEz-gZ+ve2hLGZN24PZ=jayQpJJ5fvLg at mail dot gmail dot com>
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 generating conditional move
> instructions.
>
> +fkeep-gc-roots-live
> +Common Report Var(flag_keep_gc_roots_live) Optimization
> +Always keep a pointer to a live memory block
> +
> floop-parallelize-all
> Common Report Var(flag_loop_parallelize_all) Optimization
> Mark all loops as parallel.
> Index: doc/invoke.texi
> ===================================================================
> --- doc/invoke.texi (revision 232580)
> +++ doc/invoke.texi (working copy)
> @@ -359,7 +359,7 @@
> -fno-ira-share-spill-slots @gol
> -fisolate-erroneous-paths-dereference -fisolate-erroneous-paths-attribute @gol
> -fivopts -fkeep-inline-functions -fkeep-static-functions @gol
> --fkeep-static-consts -flive-range-shrinkage @gol
> +-fkeep-static-consts -fkeep-gc-roots-live -flive-range-shrinkage @gol
> -floop-block -floop-interchange -floop-strip-mine @gol
> -floop-unroll-and-jam -floop-nest-optimize @gol
> -floop-parallelize-all -flra-remat -flto -flto-compression-level @gol
> @@ -6621,6 +6621,17 @@
> If you use @option{-Wunsafe-loop-optimizations}, the compiler warns you
> if it finds this kind of loop.
>
> +@item -fkeep-gc-roots-live
> +@opindex fkeep-gc-roots-live
> +This option tells the compiler that a garbage collector will be used,
> +and that therefore the compiled code must retain a live pointer into
> +all memory blocks. The compiler is permitted to construct a pointer
> +that is outside the bounds of a memory block, but it must ensure that
> +given a pointer into memory, some pointer into that memory remains
> +live in the compiled code whenever it is live in the source code.
> +This option is disabled by default for most languages, enabled by
> +default for languages that use garbage collection.
Is the patch missing some logic to make the option be enabled by default
for gc-using languages? (presumably go, and maybe java?)
[...snip...]
- References:
- Patch RFA: Add option -fcollectible-pointers, use it in ivopts
- Re: Patch RFA: Add option -fcollectible-pointers, use it in ivopts
- Re: Patch RFA: Add option -fcollectible-pointers, use it in ivopts
- Re: Patch RFA: Add option -fcollectible-pointers, use it in ivopts
- Re: Patch RFA: Add option -fcollectible-pointers, use it in ivopts
- Re: Patch RFA: Add option -fcollectible-pointers, use it in ivopts
- Re: Patch RFA: Add option -fcollectible-pointers, use it in ivopts
- Re: Patch RFA: Add option -fcollectible-pointers, use it in ivopts
- Re: Patch RFA: Add option -fcollectible-pointers, use it in ivopts
- Re: Patch RFA: Add option -fcollectible-pointers, use it in ivopts
- Re: Patch RFA: Add option -fcollectible-pointers, use it in ivopts