This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Need advice on bounds checking approaches
- To: Greg McGary <gkm at eng dot ascend dot com>
- Subject: Re: Need advice on bounds checking approaches
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Wed, 29 Mar 2000 13:13:48 -0700
- cc: Joern Rennecke <amylaar at cygnus dot co dot uk>, gcc at gcc dot gnu dot org
- Reply-To: law at cygnus dot com
In message <msaejkt998.fsf@gkm-dsl-194.ascend.com>you write:
> >
> > I'd be much happier if we could find a clean way to get the optimizations
> > you need using our existing optimizers.
>
> We can do without a special pass. CSE seems the best place to
> eliminate redundant checks, so we'd just need a little bit of code to
> handle the new check_bounds_rtx. We can just forget about doing
> default translation of check_bounds_rtx into primitive RTL, and
> require that targets supporting bounds checking handle it in the
> machine description. So far, all of the targets I want to support
> initially (i960, PowerPC, i386, MIPS) will benefit from special
> handling in the MD file anyway.
>
> Does that sound reasonable?
Seems reasonable. We should probably have some way to automatically warn the
user if they try to use bounded pointers on a target which does not have
conditional traps, etc.
We could probably note if the target supports conditional traps during one
of the RTL initializers and warn when we encounter a [un]bounded keyword or
attribute during parsing.
jeff