New flag: TREE_THIS_NOTRAP

Richard Henderson rth@redhat.com
Wed Jun 16 18:30:00 GMT 2004


On Wed, Jun 16, 2004 at 04:33:17PM +0100, Andrew Haley wrote:
> It might be worth doing this for ARRAY_REFs as well?

I think with arrays we're under the "used appropriately" clause.
If you really do have an array, all indicies won't trap.  How do
you get hold of the array?  It's either a VAR_DECL, or it's a
pointer to an array that you're dereferencing (i.e. (*a)[i]).

> 	* emit-rtl.c (set_mem_attributes_minus_bitpos): Check
> 	TREE_THIS_NOTRAP when setting MEM_NOTRAP_P.
> 	* tree-eh.c (tree_could_trap_p): Check TREE_THIS_NOTRAP.
> 	* tree.h (TREE_THIS_NOTRAP): New.

Ok.


r~



More information about the Gcc-patches mailing list