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: Tue, 28 Mar 2000 07:58:02 -0700
- cc: Geoff Keating <geoffk at cygnus dot com>, gcc at gcc dot gnu dot org
- Reply-To: law at cygnus dot com
In message <ms3dpbr5kg.fsf@gkm-dsl-194.ascend.com>you write:
> optimize away redundant conditional traps. An advantage to emitting
> separate conditional traps for low and high bounds checks is that the
> separate lower-bound check can be more easily be moved out of a loop
> for monotonically increasing pointer livs.
I hadn't thought of that. It assumes you can't overflow, but that's
probably a reasonable simplification for pointer operations.
Is there any advantage to not always emitting the high/low bounds checks
separately?
jeff