This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] -fnon-call-exceptions vs LTO
On Sun, May 16, 2010 at 7:35 PM, Jan Hubicka <hubicka@ucw.cz> wrote:
>> Hi,
>>
>> in Ada we force -fnon-call-exceptions in the front-end (like Java) so we'd
>> need a way to communicate this to the LTO streamer. ?Naive patch attached,
>> would there be a more elegant way? ?Tested on i586-suse-linux.
>
> Well, more elegant way would definitly be to make this represented in the IL.
> I guess it is relatively easy to do it at function level (i.e. make
> cfun->non_call_exceptions and prohibit inlinlining that change the value) but
> it is really more an statement property. ?Wonder how hard would be to implement
> this right...
My original plan was to save this kind of information per CU via adding
a flags section to the per-TU TRANSLATION_UNIT_DECL. That of course
requires us to force frontends use TRANSLATION_UNIT_DECL as
DECL/TYPE_CONTEXT of file-scope entities rather than NULL_TREE.
I'd then simply sorry () if we ever WPA/LTO units with non-matching flags.
Making it function-local also works, of course (it then should also prohibit
inlining between functions with different setting). That then could
support mixed units.
Richard.
> Honza
>