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 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 followup patch should adjust the documentation.

The option does in principle over-promise.  On the other hand, it's
probably pretty good in practice; Java and Go have gotten by without
this option for many years.  I only have a single test case that shows
a real problem, and it only shows up on PPC64.  That said, I'm fine
with making the option undocumented if you prefer.

Or maybe we do need some other form to represent the need to keep a pointer
alive in the IL. I suspect that for gcc-6 your patch is probably reasonable,
but we should mark the option as internal and likely to go away in the
future.

Why would the option  be likely to go away?  The option name is chosen
(based on Richi's suggestion) so that it can be applied to other
passes besides ivopts, and it's useful for languages that do not
normally do garbage collection.  If we improve the implementation as
you suggest, it would still be reasonable to keep the option.

I think it would be better described in the IL, so that in an LTO situation the restrictions would apply only to code which needs it. Although I suppose you could then enable it for C and make that generate the necessary representation.

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.


Bernd


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