Internal abort call optimization?

Richard Guenther richard.guenther@gmail.com
Tue Jun 17 16:06:00 GMT 2008


On Tue, Jun 17, 2008 at 12:04 PM, Andi Kleen <andi@firstfloor.org> wrote:
> Richard Guenther wrote:
>> On Tue, Jun 17, 2008 at 11:33 AM, Andi Kleen <andi@firstfloor.org> wrote:
>>> David Kastrup <dak@gnu.org> writes:
>>>> However, the problem is obviously not restricted to Emacs.  If the
>>>> "noreturn" attribute for the internal abort were removed, at least only
>>>> abort calls with compatible stack frame and the same (tentative)
>>>> followup code would get folded.  That would avoid the worst
>>>> head-scratchers when trying to figure out what went wrong.
>>> Without noreturn gcc wouldn't know there is no return needed after
>>> the abort().  Disabling cross jumping would be probably better.
>>> I know of a couple of more cases where such an attribute would
>>> be useful.
>>
>> You can also build with -fno-builtin-abort.
>
> But it would still cross jump the call then wouldn't it?

In principle yes, but the situations cross jumping applies would be less, as the
compiler no longer knows abort will not return (it'll also get you some extra
warnings because of this).

Richard.



More information about the Gcc mailing list