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: Mark objects death at end of scope


Hi,

On Thu, 3 Nov 2011, Jakub Jelinek wrote:

> > personality.  I'm not sure what the best fix here is.  The rest of the 
> > compiler uses COMPILER and LINKER make variables that are set 
> > correctly depending on bootstrap configuration.  But the gnattools 
> > Makefile.in doesn't know about these, so I'm don't see how this ever 
> > was supposed to work.
> 
> I must say I'm worried a little bit about using EH for something that 
> isn't EH at all in the source.

(see below for -fno-exceptions)

The point is, if I wouldn't rely on our existing cleanups handling I'd 
have to do exactly the same work via some other means with the same 
effects.  The clobbers need to be emitted at any possible scope exit path, 
including the EH exits (well, strictly speaking they don't _have_ to be, 
but then the lifetime will extend until function end, and cause 
unnecessary non-sharing).

> Do your artificial EH regions survive into .gcc_except_table,

It's possible.  At expansion time the clobbers expand to nothing, so those 
regions theoretically are mergeable with outer regions, but we don't have 
EH cleanups on RTL anymore.

> or is it just that when we are deciding whether to use any personality 
> routine at all they are still present and thus we decide to use the 
> personality routine?

That is the case, yes.

> If the latter, perhaps we could mark those artificial regions with some 
> flag and disregard them for the decision whether we need a personality 
> routine or not.

That's possible I guess, but is it worth it?  A file compiled with g++ is 
completely fine in requiring the c++ personality.  Disabling this for some 
special cases just seems like a hack.

> If we force a use of a personality routine to every C++ 
> file compiled without -fexceptions, it would mean .eh_frame would grow 
> unnecessarily.

With -fno-exceptions no personality routine is forced, and no cleanup 
regions remain.  The Ada problem is, that we don't compile our middle-end 
with -fno-exceptions.


Ciao,
Michael.


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