This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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...]


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]