Need advice on bounds checking approaches
Jeffrey A Law
law@cygnus.com
Wed Mar 29 12:22:00 GMT 2000
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
More information about the Gcc
mailing list