Re: eliminating array bounds checking overhead

Paul Evans <paule@martex.gen.oh.us>
4 May 2000 17:18:33 -0400

          From comp.compilers

Related articles
[14 earlier articles]
Re: eliminating array bounds checking overhead mayur_naik@my-deja.com (2000-04-30)
Re: eliminating array bounds checking overhead terryg@uswest.net (Terry Greyzck) (2000-05-01)
Re: eliminating array bounds checking overhead monnier+comp/compilers/news/@flint.cs.yale.edu (Stefan Monnier) (2000-05-01)
Re: eliminating array bounds checking overhead r_c_chapman@my-deja.com (2000-05-01)
Re: eliminating array bounds checking overhead markw65@my-deja.com (Mark Williams) (2000-05-04)
Re: eliminating array bounds checking overhead world!bobduff@uunet.uu.net (Robert A Duff) (2000-05-04)
Re: eliminating array bounds checking overhead paule@martex.gen.oh.us (Paul Evans) (2000-05-04)
Re: eliminating array bounds checking overhead d95josef@dtek.chalmers.se (Josef Sveningsson) (2000-05-12)
Re: eliminating array bounds checking overhead mtimmerm@opentext.nospam-remove.com (Matt Timmermans) (2000-05-12)
| List of all articles for this month |
From: Paul Evans <paule@martex.gen.oh.us>
Newsgroups: comp.compilers
Date: 4 May 2000 17:18:33 -0400
Organization: Martex, Corp.
References: 00-04-194 00-05-011
Keywords: optimize

Hello,


I have a question that's a bit of a tangent on this
topic. I'm intrested in finding papers or examples relating
to compilers that use "function elimination" (if such a thing
exists) in compiled non-functional languages (as in C, which
may be non-functional in more than one way ;)). For example:


For i = 1 to f(x)
y(i) /* do something with i */
end for


/* where f(x) has no sideffects, such as: */
integer f(integer x takes range 1..20) =
if x <= 5 then
return 5
else
return (X*2) -3
end if
end function


is unrolled into these the calls:
1: 2: 3: 4: 5: 6: 7: 8: 9: 10:
y(5); y(5); y(5); y(5); y(5); y(9); y(11); y(13); y(15); y(17);






P.S. Are there big CS paper archives other than NSTRAL (sp?) out there?


Thanks,


-Paul


r_c_chapman@my-deja.com wrote:
>
> > 1. index an array without checking its bounds
>
> A completely different appraoch to this problem is taken by SPARK,
> which is used in safety-critical systems (e.g. EuroFighter,
> Lockheed C130J)
>
> In SPARK, we can generate verification conditions (VCs) the proof of
> which show that such a run-time check can never fail. (SPARK is an
> annotated subset of Ada95 for those of you who've never heard of
> it... :-) )
>
> The Examiner (SPARK's static analysis tool) can generate such VCs for
> all instances of predefined exceptions. Once the proofs are
> discharged, then the compiler can _justifiably_ be instructed to
> simply eliminate the checking code.
>
> - Rod Chapman
> Praxis Critical Systems
> http://www.praxis-cs.co.uk/


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.