Do not produce empty try-finally statements

Michael Matz
Tue Jan 28 12:48:00 GMT 2014


On Tue, 28 Jan 2014, Jakub Jelinek wrote:

> There are two kinds of clobbers, the direct ones, which surely can be 
> safely removed by ehcleanup1 if they are the only reason why there is a 
> landing pad which will be rethrown outside of the current function,

You can only safely (as in, not introducing false conflicts for stack 
slots) remove them before inlining, _if_ the inliner would add them back 
in ...

> For the direct cleanups, the important thing is that they are necessarily
> local variables in the current function, so when returning from that
> function, whether normally or abnormally, the inliner still has all the info
> about them.  If it wants, it can add the corresponding clobbers itself

... which it doesn't.

> (not sure if it does or doesn't bother, but if it doesn't bother right 
> now, it certainly could add those in the future if it proves to be 
> important).


More information about the Gcc-patches mailing list