This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: support array bounds checking
- To: egcs-patches at egcs dot cygnus dot com
- Subject: Re: support array bounds checking
- From: Herman ten Brugge <Haj dot Ten dot Brugge at net dot HCC dot nl>
- Date: Mon, 14 Jun 1999 20:43:03 +0100 (WEST)
- Cc: gkm at eng dot ascend dot com, bothner at pacbell dot net, rjones at orchestream dot com
Hello,
I just implemented the hybrid implementation suggested by Per Bothner
in my version of bounds checking for gcc. This version is present at
http://web.inter.NL.net/hcc/Haj.Ten.Brugge/bounds-checking-egcs-1.1.2-1.02.tar.gz
I started implementing on last friday so there may be errors in the
current release. I also have to optimize some more things. I did allready
implement some small improvements. I also found a small problem when
invalidating chunks. The assigment 'P1 = P2' should be rewritten as
'P1$chunk = UNKNOWN_CHUNK, P1 = P2'. There is a problem when P2 uses P2$chunk.
So I rewrote this as 'tmp = (P1 = P2), P1$chunk = UNKNOWN_CHUNK, tmp'.
I did the same for invalidating pointer operations.
The effect of these patches are faster bounds-checking code. I have to
repeat some tests from Richard Jones to check how much faster the code
really is. There will allways be a slowdown of about a factor 4 to 5
because we have to validate every pointer operation. A slowdown of
50 as mentioned in Richard Jones report will probably not occur anymore
because of this hybrid implementation.
Herman.