Andrew Haley - Re: [x86 PATCH] Mark builtin intrinsics as "nothrow" (original) (raw)
This is the mail archive of the gcc-patches@gcc.gnu.orgmailing 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] |
- From: Andrew Haley
- To: Andi Kleen
- Cc: Steven Bosscher , gcc-patches at gcc dot gnu dot org
- Date: Sat, 10 Feb 2007 11:10:06 +0000
- Subject: Re: [x86 PATCH] Mark builtin intrinsics as "nothrow"
- References: 1404.68.35.10.103.1171077243.squirrel@mail.eyesopen.com.suse.lists.egcs-patches 200702101103.07058.steven.bosscher@gmail.com.suse.lists.egcs-patches <p73bqk21dcg.fsf@bingen.suse.de>
Andi Kleen writes:
Steven Bosscher stevenb.gcc@gmail.com writes:
On Saturday 10 February 2007 04:14, Roger Sayle wrote:
The following simple patch tweaks i386.c's builtin_def function to annotate the back-end intrinsics as "nothrow", by setting the TREE_NOTHROW bit of their "decl". This allows for simplification of the CFG at the tree-level for C++ codes, such as in the example below:
Is this really safe if the builtin may trap (e.g. builtins for division vs. division by zero)?
AFAIK OS signals cannot be safely caught by C++ exception handlers.
Sure they can. We've been doing this in libgcj for years.
Divide builtins must not be marked nothrow when compiling with -fnon-call-exceptions.
Andrew.
- Follow-Ups:
- Re: [x86 PATCH] Mark builtin intrinsics as "nothrow"
* From: Andi Kleen
- Re: [x86 PATCH] Mark builtin intrinsics as "nothrow"
- References:
- Re: [x86 PATCH] Mark builtin intrinsics as "nothrow"
* From: Andi Kleen
- Re: [x86 PATCH] Mark builtin intrinsics as "nothrow"
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |